refactor
This commit is contained in:
parent
faae26863f
commit
542368fd3d
|
@ -13,7 +13,7 @@
|
||||||
{{#if !originalStatus.spoiler_text || spoilerShown}}
|
{{#if !originalStatus.spoiler_text || spoilerShown}}
|
||||||
<StatusContent status="{{originalStatus}}" :isStatusInOwnThread />
|
<StatusContent status="{{originalStatus}}" :isStatusInOwnThread />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if hasMedia}}
|
{{#if originalStatus.media_attachments && originalStatus.media_attachments.length}}
|
||||||
<StatusMediaAttachments status="{{originalStatus}}" on:recalculateHeight />
|
<StatusMediaAttachments status="{{originalStatus}}" on:recalculateHeight />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<StatusToolbar :status />
|
<StatusToolbar :status />
|
||||||
|
@ -52,10 +52,10 @@
|
||||||
import StatusSidebar from './StatusSidebar.html'
|
import StatusSidebar from './StatusSidebar.html'
|
||||||
import StatusHeader from './StatusHeader.html'
|
import StatusHeader from './StatusHeader.html'
|
||||||
import StatusAuthor from './StatusAuthor.html'
|
import StatusAuthor from './StatusAuthor.html'
|
||||||
import StatusContent from './StatusContent.html'
|
|
||||||
import StatusToolbar from './StatusToolbar.html'
|
import StatusToolbar from './StatusToolbar.html'
|
||||||
import StatusSpoiler from './StatusSpoiler.html'
|
|
||||||
import StatusMediaAttachments from './StatusMediaAttachments.html'
|
import StatusMediaAttachments from './StatusMediaAttachments.html'
|
||||||
|
import StatusContent from './StatusContent.html'
|
||||||
|
import StatusSpoiler from './StatusSpoiler.html'
|
||||||
import { store } from '../../_store/store'
|
import { store } from '../../_store/store'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -63,18 +63,17 @@
|
||||||
StatusSidebar,
|
StatusSidebar,
|
||||||
StatusHeader,
|
StatusHeader,
|
||||||
StatusAuthor,
|
StatusAuthor,
|
||||||
StatusContent,
|
|
||||||
StatusToolbar,
|
StatusToolbar,
|
||||||
StatusSpoiler,
|
|
||||||
StatusMediaAttachments,
|
StatusMediaAttachments,
|
||||||
|
StatusContent,
|
||||||
|
StatusSpoiler
|
||||||
},
|
},
|
||||||
store: () => store,
|
store: () => store,
|
||||||
computed: {
|
computed: {
|
||||||
originalStatus: (status) => status.reblog ? status.reblog : status,
|
originalStatus: (status) => status.reblog ? status.reblog : status,
|
||||||
statusId: (originalStatus) => originalStatus.id,
|
statusId: (originalStatus) => originalStatus.id,
|
||||||
hasMedia: (originalStatus) => originalStatus.media_attachments && originalStatus.media_attachments.length,
|
|
||||||
isStatusInOwnThread: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId,
|
|
||||||
originalAccount: (originalStatus) => originalStatus.account,
|
originalAccount: (originalStatus) => originalStatus.account,
|
||||||
|
isStatusInOwnThread: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId,
|
||||||
spoilerShown: ($spoilersShown, $currentInstance, statusId) => $spoilersShown && $spoilersShown[$currentInstance] && $spoilersShown[$currentInstance][statusId]
|
spoilerShown: ($spoilersShown, $currentInstance, statusId) => $spoilersShown && $spoilersShown[$currentInstance] && $spoilersShown[$currentInstance][statusId]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue