2021-08-06 20:18:27 -04:00
|
|
|
<template>
|
2022-11-07 13:53:56 -05:00
|
|
|
<article class="thread-tree">
|
2026-06-30 05:42:09 +03:00
|
|
|
<Status
|
2021-08-06 20:18:27 -04:00
|
|
|
:key="status.id"
|
|
|
|
|
ref="statusComponent"
|
|
|
|
|
:statusoid="status"
|
2026-06-30 06:00:41 +03:00
|
|
|
:replies="getReplies(status.id)"
|
|
|
|
|
:inline-expanded="collapsable && isExpanded"
|
2021-08-06 20:18:27 -04:00
|
|
|
:expandable="!isExpanded"
|
|
|
|
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
2025-05-13 17:54:35 +03:00
|
|
|
:focused="isFocusedFunction(status.id)"
|
2021-08-06 20:18:27 -04:00
|
|
|
:in-conversation="isExpanded"
|
2026-06-30 06:17:17 +03:00
|
|
|
:highlight="highlight === status.id"
|
2021-08-06 20:18:27 -04:00
|
|
|
:in-profile="inProfile"
|
|
|
|
|
:profile-user-id="profileUserId"
|
2021-08-07 00:33:06 -04:00
|
|
|
class="conversation-status conversation-status-treeview status-fadein panel-body"
|
|
|
|
|
|
2021-08-07 18:53:23 -04:00
|
|
|
:simple-tree="simple"
|
2026-06-30 06:00:41 +03:00
|
|
|
:thread-display-status="threadDisplayStatus[status.id]"
|
|
|
|
|
:can-dive="canDive"
|
2026-06-30 06:17:17 +03:00
|
|
|
|
2026-06-30 06:00:41 +03:00
|
|
|
@dive="$emit('dive', status.id)"
|
2026-06-30 06:17:17 +03:00
|
|
|
@goto="$emit('goto', status.id)"
|
2025-02-04 14:14:31 +02:00
|
|
|
@toggle-expanded="toggleExpanded"
|
2026-06-30 05:42:09 +03:00
|
|
|
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
|
2021-08-06 20:18:27 -04:00
|
|
|
/>
|
|
|
|
|
<div
|
2026-06-30 06:00:41 +03:00
|
|
|
v-if="currentReplies.length > 0 && threadShowing"
|
2021-08-06 20:18:27 -04:00
|
|
|
class="thread-tree-replies"
|
|
|
|
|
>
|
2026-06-30 05:42:09 +03:00
|
|
|
<ThreadTree
|
2021-08-06 20:18:27 -04:00
|
|
|
v-for="replyStatus in currentReplies"
|
|
|
|
|
:key="replyStatus.id"
|
|
|
|
|
ref="childComponent"
|
2021-08-07 00:33:06 -04:00
|
|
|
:depth="depth + 1"
|
2021-08-06 20:18:27 -04:00
|
|
|
:status="replyStatus"
|
|
|
|
|
|
|
|
|
|
:in-profile="inProfile"
|
|
|
|
|
:conversation="conversation"
|
|
|
|
|
:collapsable="collapsable"
|
|
|
|
|
:is-expanded="isExpanded"
|
|
|
|
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
|
|
|
|
:profile-user-id="profileUserId"
|
|
|
|
|
|
2025-05-13 17:54:35 +03:00
|
|
|
:is-focused-function="isFocusedFunction"
|
2021-08-06 20:18:27 -04:00
|
|
|
:get-replies="getReplies"
|
2021-08-07 18:53:23 -04:00
|
|
|
:highlight="highlight"
|
2021-08-06 20:18:27 -04:00
|
|
|
:set-highlight="setHighlight"
|
|
|
|
|
:toggle-expanded="toggleExpanded"
|
|
|
|
|
|
2021-08-07 18:53:23 -04:00
|
|
|
:simple="simple"
|
2021-08-07 00:33:06 -04:00
|
|
|
:thread-display-status="threadDisplayStatus"
|
|
|
|
|
:show-thread-recursively="showThreadRecursively"
|
|
|
|
|
:total-reply-count="totalReplyCount"
|
|
|
|
|
:total-reply-depth="totalReplyDepth"
|
2026-06-30 05:42:09 +03:00
|
|
|
|
2026-06-30 06:00:41 +03:00
|
|
|
:can-dive="canDive"
|
2026-06-30 06:17:17 +03:00
|
|
|
@goto="(e) => $emit('goto', e)"
|
2026-06-30 06:00:41 +03:00
|
|
|
@dive="(e) => $emit('dive', e)"
|
2026-06-30 05:42:09 +03:00
|
|
|
@suspendable-state-change="e => $emit('suspendableStateChange', e)"
|
2021-08-06 20:18:27 -04:00
|
|
|
/>
|
|
|
|
|
</div>
|
2021-08-07 00:33:06 -04:00
|
|
|
<div
|
|
|
|
|
v-if="currentReplies.length && !threadShowing"
|
|
|
|
|
class="thread-tree-replies thread-tree-replies-hidden"
|
|
|
|
|
>
|
2022-03-29 12:04:09 +03:00
|
|
|
<i18n-t
|
2021-08-07 18:53:23 -04:00
|
|
|
v-if="simple"
|
2022-03-29 15:35:18 +03:00
|
|
|
scope="global"
|
2021-08-07 18:53:23 -04:00
|
|
|
tag="button"
|
2022-03-23 16:31:34 +02:00
|
|
|
keypath="status.thread_follow_with_icon"
|
2021-08-07 18:53:23 -04:00
|
|
|
class="button-unstyled -link thread-tree-show-replies-button"
|
2026-06-30 06:00:41 +03:00
|
|
|
@click.prevent="$emit('dive', status.id)"
|
2021-08-07 18:53:23 -04:00
|
|
|
>
|
2022-03-23 16:31:34 +02:00
|
|
|
<template #icon>
|
|
|
|
|
<FAIcon
|
|
|
|
|
icon="angle-double-right"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #text>
|
|
|
|
|
<span>
|
2025-01-02 22:58:36 +02:00
|
|
|
{{ $t('status.thread_follow', { numStatus: totalReplyCount[status.id] }, totalReplyCount[status.id]) }}
|
2022-03-23 16:31:34 +02:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2022-03-29 12:04:09 +03:00
|
|
|
<i18n-t
|
2021-08-07 18:53:23 -04:00
|
|
|
v-else
|
2022-03-29 12:04:09 +03:00
|
|
|
scope="global"
|
2021-08-07 11:59:10 -04:00
|
|
|
tag="button"
|
2022-03-23 16:31:34 +02:00
|
|
|
keypath="status.thread_show_full_with_icon"
|
2021-08-07 00:33:06 -04:00
|
|
|
class="button-unstyled -link thread-tree-show-replies-button"
|
2021-08-07 11:59:10 -04:00
|
|
|
@click.prevent="showThreadRecursively(status.id)"
|
2021-08-07 00:33:06 -04:00
|
|
|
>
|
2022-03-23 16:31:34 +02:00
|
|
|
<template #icon>
|
|
|
|
|
<FAIcon
|
|
|
|
|
icon="angle-double-down"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #text>
|
|
|
|
|
<span>
|
2025-01-02 22:58:36 +02:00
|
|
|
{{ $t('status.thread_show_full', { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }, totalReplyCount[status.id]) }}
|
2022-03-23 16:31:34 +02:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2021-08-07 00:33:06 -04:00
|
|
|
</div>
|
2022-11-07 13:53:56 -05:00
|
|
|
</article>
|
2021-08-06 20:18:27 -04:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script src="./thread_tree.js"></script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.thread-tree-replies {
|
2024-03-04 19:45:42 +02:00
|
|
|
margin-left: var(--status-margin);
|
|
|
|
|
border-left: 2px solid var(--border);
|
2021-08-06 20:18:27 -04:00
|
|
|
}
|
2021-08-08 12:40:17 -04:00
|
|
|
|
2021-08-07 00:33:06 -04:00
|
|
|
.thread-tree-replies-hidden {
|
2024-03-04 19:45:42 +02:00
|
|
|
padding: var(--status-margin);
|
2023-01-09 13:02:16 -05:00
|
|
|
|
2021-08-08 13:29:49 -04:00
|
|
|
/* Make the button stretch along the whole row */
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
flex-direction: column;
|
2021-08-07 00:33:06 -04:00
|
|
|
}
|
2021-08-06 20:18:27 -04:00
|
|
|
</style>
|