fix links in statuses
This commit is contained in:
parent
9d42970493
commit
cda9566eb0
|
@ -6,7 +6,9 @@
|
||||||
<img src="{{profile.avatar}}" aria-hidden="true">
|
<img src="{{profile.avatar}}" aria-hidden="true">
|
||||||
</div>
|
</div>
|
||||||
<div class="account-profile-name">
|
<div class="account-profile-name">
|
||||||
|
<a rel="noopener" target="_blank" href="{{profile.url}}">
|
||||||
{{profile.display_name}}
|
{{profile.display_name}}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-profile-username">
|
<div class="account-profile-username">
|
||||||
{{'@' + profile.acct}}
|
{{'@' + profile.acct}}
|
||||||
|
@ -127,6 +129,14 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
.account-profile-name a {
|
||||||
|
color: var(--body-text-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.account-profile-name a:hover {
|
||||||
|
color: var(--body-text-color);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
.account-profile-note {
|
.account-profile-note {
|
||||||
grid-area: note;
|
grid-area: note;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
|
|
|
@ -7,22 +7,37 @@
|
||||||
<use xlink:href="#fa-retweet" />
|
<use xlink:href="#fa-retweet" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span>
|
||||||
<a href="/accounts/{{status.account.id}}">
|
{{#if timelineType === 'account' && timelineValue === status.account.id}}
|
||||||
{{status.account.username}}
|
<a rel="noopener" target="_blank" href="{{status.account.url}}">{{status.account.username}}</a>
|
||||||
</a> boosted
|
{{else}}
|
||||||
|
<a href="/accounts/{{status.account.id}}">{{status.account.username}}</a>
|
||||||
|
{{/if}}
|
||||||
|
boosted
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="status-author">
|
<div class="status-author">
|
||||||
|
{{#if timelineType === 'account' && timelineValue === originalAccount.id}}
|
||||||
|
<a class="status-author-name" rel="noopener" target="_blank" href="{{originalAccount.url}}">
|
||||||
|
{{originalAccount.display_name || originalAccount.username}}
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
<a class="status-author-name" href="/accounts/{{originalAccount.id}}">
|
<a class="status-author-name" href="/accounts/{{originalAccount.id}}">
|
||||||
{{originalAccount.display_name || originalAccount.username}}
|
{{originalAccount.display_name || originalAccount.username}}
|
||||||
</a>
|
</a>
|
||||||
|
{{/if}}
|
||||||
<span class="status-author-handle">
|
<span class="status-author-handle">
|
||||||
{{'@' + originalAccount.acct}}
|
{{'@' + originalAccount.acct}}
|
||||||
</span>
|
</span>
|
||||||
|
{{#if timelineType === 'status'}}
|
||||||
|
<a class="status-author-date" rel="noopener" target="_blank" href="{{originalStatus.url}}">
|
||||||
|
<time datetime={{createdAtDate}} title="{{relativeDate}}">{{relativeDate}}</time>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
<a class="status-author-date" href="/statuses/{{originalStatus.id}}">
|
<a class="status-author-date" href="/statuses/{{originalStatus.id}}">
|
||||||
<time datetime={{createdAtDate}} title="{{relativeDate}}">{{relativeDate}}</time>
|
<time datetime={{createdAtDate}} title="{{relativeDate}}">{{relativeDate}}</time>
|
||||||
</a>
|
</a>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<Avatar account={{originalAccount}} className="status-sidebar"/>
|
<Avatar account={{originalAccount}} className="status-sidebar"/>
|
||||||
{{#if originalStatus.spoiler_text}}
|
{{#if originalStatus.spoiler_text}}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
<Status status="{{virtualProps}}" index="{{virtualIndex}}" length="{{virtualLength}}" on:recalculateHeight />
|
<Status status="{{virtualProps.status}}"
|
||||||
|
timelineType="{{virtualProps.timelineType}}"
|
||||||
|
timelineValue="{{virtualProps.timelineValue}}"
|
||||||
|
index="{{virtualIndex}}"
|
||||||
|
length="{{virtualLength}}"
|
||||||
|
on:recalculateHeight />
|
||||||
<script>
|
<script>
|
||||||
import Status from '../status/Status.html'
|
import Status from '../status/Status.html'
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,11 @@
|
||||||
LoadingFooter: LoadingFooter
|
LoadingFooter: LoadingFooter
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
makeProps: ($currentInstance) => (statusId) => database.getStatus($currentInstance, statusId),
|
makeProps: ($currentInstance, timelineType, timelineValue) => async (statusId) => ({
|
||||||
|
timelineType: timelineType,
|
||||||
|
timelineValue: timelineValue,
|
||||||
|
status: await database.getStatus($currentInstance, statusId)
|
||||||
|
}),
|
||||||
label: (timeline, $currentInstance, timelineType, timelineValue) => {
|
label: (timeline, $currentInstance, timelineType, timelineValue) => {
|
||||||
if (timelines[timeline]) {
|
if (timelines[timeline]) {
|
||||||
return `${timelines[timeline].label} timeline for ${$currentInstance}`
|
return `${timelines[timeline].label} timeline for ${$currentInstance}`
|
||||||
|
|
Loading…
Reference in a new issue