Support diving into one status in a conversation

This commit is contained in:
Tusooa Zhu 2021-08-07 11:59:10 -04:00
parent ace1f5067c
commit 84a3cd92a3
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
6 changed files with 94 additions and 13 deletions

View file

@ -31,7 +31,8 @@ const ThreadTree = {
totalReplyDepth: Object,
statusContentProperties: Object,
setStatusContentProperty: Function,
toggleStatusContentProperty: Function
toggleStatusContentProperty: Function,
dive: Function
},
computed: {
reverseLookupTable () {

View file

@ -24,6 +24,7 @@
:controlled-toggle-showing-tall="() => toggleCurrentProp('ShowingTall')"
:controlled-toggle-expanding-subject="() => toggleCurrentProp('expandingSubject')"
:controlled-toggle-showing-long-subject="() => toggleCurrentProp('showingLongSubject')"
:dive="dive ? () => dive(status.id) : undefined"
@goto="setHighlight"
@toggleExpanded="toggleExpanded"
@ -60,18 +61,24 @@
:status-content-properties="statusContentProperties"
:set-status-content-property="setStatusContentProperty"
:toggle-status-content-property="toggleStatusContentProperty"
:dive="dive"
/>
</div>
<div
v-if="currentReplies.length && !threadShowing"
class="thread-tree-replies thread-tree-replies-hidden"
>
<button
<i18n
tag="button"
path="status.thread_show_full_with_icon"
class="button-unstyled -link thread-tree-show-replies-button"
@click="showThreadRecursively(status.id)"
@click.prevent="showThreadRecursively(status.id)"
>
{{ $tc('status.thread_show_full', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }) }}
</button>
<FAIcon place="icon" icon="angle-double-down" />
<span place="text">
{{ $tc('status.thread_show_full', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }) }}
</span>
</i18n>
</div>
</div>
</template>