2021-08-07 10:18:27 +10:00
|
|
|
<template>
|
|
|
|
<div class="thread-tree panel-body">
|
|
|
|
<status
|
|
|
|
:key="status.id"
|
|
|
|
ref="statusComponent"
|
|
|
|
:inline-expanded="collapsable && isExpanded"
|
|
|
|
:statusoid="status"
|
|
|
|
:expandable="!isExpanded"
|
|
|
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
|
|
|
:focused="focused(status.id)"
|
|
|
|
:in-conversation="isExpanded"
|
|
|
|
:highlight="getHighlight()"
|
|
|
|
:replies="getReplies(status.id)"
|
|
|
|
:in-profile="inProfile"
|
|
|
|
:profile-user-id="profileUserId"
|
2021-08-07 14:33:06 +10:00
|
|
|
class="conversation-status conversation-status-treeview status-fadein panel-body"
|
|
|
|
|
|
|
|
:controlled-thread-display-status="threadDisplayStatus[status.id]"
|
|
|
|
:controlled-toggle-thread-display="() => toggleThreadDisplay(status.id)"
|
|
|
|
|
2021-08-07 10:18:27 +10:00
|
|
|
@goto="setHighlight"
|
|
|
|
@toggleExpanded="toggleExpanded"
|
|
|
|
/>
|
|
|
|
<div
|
2021-08-07 14:33:06 +10:00
|
|
|
v-if="currentReplies.length && threadShowing"
|
2021-08-07 10:18:27 +10:00
|
|
|
class="thread-tree-replies"
|
|
|
|
>
|
|
|
|
<thread-tree
|
|
|
|
v-for="replyStatus in currentReplies"
|
|
|
|
:key="replyStatus.id"
|
|
|
|
ref="childComponent"
|
2021-08-07 14:33:06 +10:00
|
|
|
:depth="depth + 1"
|
2021-08-07 10:18:27 +10:00
|
|
|
:status="replyStatus"
|
|
|
|
|
|
|
|
:in-profile="inProfile"
|
|
|
|
:conversation="conversation"
|
|
|
|
:collapsable="collapsable"
|
|
|
|
:is-expanded="isExpanded"
|
|
|
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
|
|
|
:profile-user-id="profileUserId"
|
|
|
|
|
|
|
|
:focused="focused"
|
|
|
|
:get-replies="getReplies"
|
|
|
|
:get-highlight="getHighlight"
|
|
|
|
:set-highlight="setHighlight"
|
|
|
|
:toggle-expanded="toggleExpanded"
|
|
|
|
|
2021-08-07 14:33:06 +10:00
|
|
|
:toggle-thread-display="toggleThreadDisplay"
|
|
|
|
:thread-display-status="threadDisplayStatus"
|
|
|
|
:show-thread-recursively="showThreadRecursively"
|
|
|
|
:total-reply-count="totalReplyCount"
|
|
|
|
:total-reply-depth="totalReplyDepth"
|
2021-08-07 10:18:27 +10:00
|
|
|
/>
|
|
|
|
</div>
|
2021-08-07 14:33:06 +10:00
|
|
|
<div
|
|
|
|
v-if="currentReplies.length && !threadShowing"
|
|
|
|
class="thread-tree-replies thread-tree-replies-hidden"
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
class="button-unstyled -link thread-tree-show-replies-button"
|
|
|
|
@click="showThreadRecursively(status.id)"
|
|
|
|
>
|
2021-08-07 15:05:26 +10:00
|
|
|
{{ $tc('status.thread_show_full', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }) }}
|
2021-08-07 14:33:06 +10:00
|
|
|
</button>
|
|
|
|
</div>
|
2021-08-07 10:18:27 +10:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./thread_tree.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2021-08-07 14:33:06 +10:00
|
|
|
@import '../../_variables.scss';
|
2021-08-07 10:18:27 +10:00
|
|
|
.thread-tree-replies {
|
|
|
|
margin-left: 1em;
|
|
|
|
}
|
2021-08-07 14:33:06 +10:00
|
|
|
.thread-tree-replies-hidden {
|
|
|
|
padding: 1em;
|
|
|
|
border-bottom: 1px solid var(--border, #222);
|
|
|
|
}
|
|
|
|
.conversation-status.conversation-status-treeview:last-child,
|
|
|
|
.Conversation.-expanded .conversation-status.conversation-status-treeview:last-child {
|
|
|
|
border-bottom: 1px solid var(--border, #222);
|
|
|
|
}
|
2021-08-07 10:18:27 +10:00
|
|
|
</style>
|