refactor isStatusInOwnThread

This commit is contained in:
Nolan Lawson 2018-02-04 12:07:22 -08:00
parent 835a9a5b28
commit 4f89f6f7f1
3 changed files with 5 additions and 5 deletions

View File

@ -1,11 +1,11 @@
<article class="status-article {{originalStatus.visibility === 'direct' ? 'status-direct' : ''}} {{isStatusInContext ? 'status-in-context' : ''}}"
<article class="status-article {{originalStatus.visibility === 'direct' ? 'status-direct' : ''}} {{isStatusInOwnThread ? 'status-in-own-thread' : ''}}"
tabindex="0"
aria-posinset="{{index}}" aria-setsize="{{length}}"
on:recalculateHeight>
{{#if (notification && (notification.type === 'reblog' || notification.type === 'favourite')) || status.reblog}}
<StatusHeader :notification :status />
{{/if}}
<StatusAuthor status="{{originalStatus}}" :isStatusInContext />
<StatusAuthor status="{{originalStatus}}" :isStatusInOwnThread />
<StatusSidebar status="{{originalStatus}}" />
{{#if originalStatus.spoiler_text}}
<StatusSpoiler status="{{originalStatus}}" :spoilerShown on:recalculateHeight />
@ -73,7 +73,7 @@
originalStatus: (status) => status.reblog ? status.reblog : status,
statusId: (originalStatus) => originalStatus.id,
hasMedia: (originalStatus) => originalStatus.media_attachments && originalStatus.media_attachments.length,
isStatusInContext: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId,
isStatusInOwnThread: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId,
originalAccount: (originalStatus) => originalStatus.account,
spoilerShown: ($spoilersShown, $currentInstance, statusId) => $spoilersShown && $spoilersShown[$currentInstance] && $spoilersShown[$currentInstance][statusId]
}

View File

@ -5,7 +5,7 @@
<span class="status-author-handle">
{{'@' + status.account.acct}}
</span>
{{#if isStatusInContext}}
{{#if isStatusInOwnThread}}
<ExternalLink class="status-author-date" href="{{status.url}}" showIcon="true">
<time datetime={{createdAtDate}} title="{{relativeDate}}">{{relativeDate}}</time>
</ExternalLink>

View File

@ -11,7 +11,7 @@
font-size: 0.9em;
}
.status-in-context .status-content {
.status-in-own-thread .status-content {
font-size: 1.3em;
margin: 20px 10px 20px 5px;
}