2016-11-24 18:17:09 +01:00
|
|
|
<template>
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
2020-09-29 10:18:37 +00:00
|
|
|
v-if="!hideStatus"
|
|
|
|
|
:style="hiddenStyle"
|
2020-07-28 01:27:11 +03:00
|
|
|
class="Conversation"
|
|
|
|
|
:class="{ '-expanded' : isExpanded, 'panel' : isExpanded }"
|
2019-07-05 10:17:44 +03:00
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
v-if="isExpanded"
|
2022-04-19 23:06:57 +03:00
|
|
|
class="panel-heading conversation-heading -sticky"
|
2019-07-05 10:17:44 +03:00
|
|
|
>
|
2024-10-22 08:24:06 +00:00
|
|
|
<h1 class="title">
|
2026-07-23 13:42:41 +03:00
|
|
|
<RichContent
|
2026-08-04 14:33:17 +03:00
|
|
|
v-if="conversation[0]?.summary_raw_html"
|
|
|
|
|
:html="conversation[0].summary_raw_html"
|
|
|
|
|
:emoji="conversation[0].emojis"
|
2026-08-04 19:20:51 +03:00
|
|
|
/>
|
2026-07-23 13:42:41 +03:00
|
|
|
<template v-else>
|
2026-08-04 19:20:51 +03:00
|
|
|
{{ $t('timeline.conversation') }}
|
2026-07-23 13:42:41 +03:00
|
|
|
</template>
|
2024-10-22 08:24:06 +00:00
|
|
|
</h1>
|
2020-11-24 12:32:42 +02:00
|
|
|
<button
|
|
|
|
|
v-if="collapsable"
|
|
|
|
|
class="button-unstyled -link"
|
|
|
|
|
@click.prevent="toggleExpanded"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('timeline.collapse') }}
|
|
|
|
|
</button>
|
2022-08-01 23:20:27 +03:00
|
|
|
<QuickFilterSettings
|
2025-01-19 17:22:42 +02:00
|
|
|
v-if="!collapsable && mobileLayout"
|
2022-08-01 23:20:27 +03:00
|
|
|
:conversation="true"
|
2022-10-09 18:50:13 +03:00
|
|
|
class="rightside-button"
|
2022-08-04 23:44:56 +03:00
|
|
|
/>
|
2022-08-01 23:20:27 +03:00
|
|
|
<QuickViewSettings
|
|
|
|
|
v-if="!collapsable"
|
|
|
|
|
:conversation="true"
|
2022-10-09 18:50:13 +03:00
|
|
|
class="rightside-button"
|
2022-08-04 23:44:56 +03:00
|
|
|
/>
|
2017-02-04 13:52:26 +01:00
|
|
|
</div>
|
2024-03-04 18:24:29 +02:00
|
|
|
<div
|
2024-04-14 11:46:29 -04:00
|
|
|
v-if="isPage && !status"
|
|
|
|
|
class="conversation-body"
|
|
|
|
|
:class="{ 'panel-body': isExpanded }"
|
|
|
|
|
>
|
|
|
|
|
<p v-if="!loadStatusError">
|
|
|
|
|
<FAIcon
|
|
|
|
|
spin
|
|
|
|
|
icon="circle-notch"
|
|
|
|
|
/>
|
|
|
|
|
{{ $t('status.loading') }}
|
|
|
|
|
</p>
|
|
|
|
|
<p v-else>
|
|
|
|
|
{{ $t('status.load_error', { error: loadStatusError }) }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-else
|
2024-03-04 18:24:29 +02:00
|
|
|
class="conversation-body"
|
|
|
|
|
:class="{ 'panel-body': isExpanded }"
|
2024-03-04 21:40:35 +02:00
|
|
|
>
|
2021-08-08 12:40:17 -04:00
|
|
|
<div
|
|
|
|
|
v-if="isTreeView"
|
|
|
|
|
class="thread-body"
|
|
|
|
|
>
|
2022-03-06 13:50:15 -05:00
|
|
|
<div
|
|
|
|
|
v-if="shouldShowAllConversationButton"
|
|
|
|
|
class="conversation-dive-to-top-level-box"
|
|
|
|
|
>
|
2022-03-23 16:31:34 +02:00
|
|
|
<i18n-t
|
|
|
|
|
keypath="status.show_all_conversation_with_icon"
|
2022-03-06 13:50:15 -05:00
|
|
|
tag="button"
|
|
|
|
|
class="button-unstyled -link"
|
2022-03-29 15:46:21 +03:00
|
|
|
scope="global"
|
2022-07-31 12:35:48 +03:00
|
|
|
@click.prevent="diveToTopLevel"
|
2022-03-06 13:50:15 -05:00
|
|
|
>
|
2022-03-23 16:31:34 +02:00
|
|
|
<template #icon>
|
|
|
|
|
<FAIcon
|
|
|
|
|
icon="angle-double-left"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #text>
|
|
|
|
|
<span>
|
2025-01-02 22:58:36 +02:00
|
|
|
{{ $t('status.show_all_conversation', { numStatus: otherTopLevelCount }, otherTopLevelCount) }}
|
2022-03-23 16:31:34 +02:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2022-03-06 13:50:15 -05:00
|
|
|
</div>
|
2021-08-10 23:58:27 -04:00
|
|
|
<div
|
2021-09-15 23:35:17 -04:00
|
|
|
v-if="shouldShowAncestors"
|
2021-08-10 23:58:27 -04:00
|
|
|
class="thread-ancestors"
|
|
|
|
|
>
|
2022-11-07 13:53:56 -05:00
|
|
|
<article
|
2021-08-10 23:58:27 -04:00
|
|
|
v-for="status in ancestorsOf(diveRoot)"
|
|
|
|
|
:key="status.id"
|
|
|
|
|
class="thread-ancestor"
|
2022-03-06 14:13:35 -05:00
|
|
|
:class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1, '-faded': shouldFadeAncestors}"
|
2021-08-10 23:58:27 -04:00
|
|
|
>
|
2026-02-15 21:31:52 +02:00
|
|
|
<Status
|
2021-08-10 23:58:27 -04:00
|
|
|
ref="statusComponent"
|
2026-02-15 21:31:52 +02:00
|
|
|
class="conversation-status status-fadein panel-body"
|
|
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
:statusoid="status"
|
2026-02-15 21:31:52 +02:00
|
|
|
:replies="getReplies(status.id)"
|
|
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
:expandable="!isExpanded"
|
2026-07-06 19:43:08 +03:00
|
|
|
:focused="maybeFocused === status.id"
|
2026-02-15 21:31:52 +02:00
|
|
|
:inline-expanded="collapsable && isExpanded"
|
|
|
|
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
2021-08-10 23:58:27 -04:00
|
|
|
:in-profile="inProfile"
|
2026-02-15 21:31:52 +02:00
|
|
|
:in-conversation="isExpanded"
|
2021-08-10 23:58:27 -04:00
|
|
|
:profile-user-id="profileUserId"
|
2021-09-05 16:35:47 -04:00
|
|
|
:simple-tree="treeViewIsSimple"
|
|
|
|
|
:show-other-replies-as-button="showOtherRepliesButtonInsideStatus"
|
2026-06-30 06:00:41 +03:00
|
|
|
can-dive
|
2021-08-10 23:58:27 -04:00
|
|
|
|
2026-07-06 19:43:08 +03:00
|
|
|
@goto="setFocused"
|
2026-06-30 06:00:41 +03:00
|
|
|
@dive="() => diveIntoStatus(status.id)"
|
2026-06-30 05:42:09 +03:00
|
|
|
@suspendable-state-change="onStatusSuspendStateChange"
|
2021-08-10 23:58:27 -04:00
|
|
|
/>
|
|
|
|
|
<div
|
2021-09-05 16:35:47 -04:00
|
|
|
v-if="showOtherRepliesButtonBelowStatus && getReplies(status.id).length > 1"
|
2021-08-10 23:58:27 -04:00
|
|
|
class="thread-ancestor-dive-box"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="thread-ancestor-dive-box-inner"
|
|
|
|
|
>
|
2022-03-23 16:31:34 +02:00
|
|
|
<i18n-t
|
2021-08-10 23:58:27 -04:00
|
|
|
tag="button"
|
2022-03-29 15:46:21 +03:00
|
|
|
scope="global"
|
2022-03-23 16:31:34 +02:00
|
|
|
keypath="status.ancestor_follow_with_icon"
|
2021-08-10 23:58:27 -04:00
|
|
|
class="button-unstyled -link thread-tree-show-replies-button"
|
|
|
|
|
@click.prevent="diveIntoStatus(status.id)"
|
|
|
|
|
>
|
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.ancestor_follow', { numReplies: getReplies(status.id, getReplies(status.id).length - 1).length - 1 }) }}
|
2022-03-23 16:31:34 +02:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2021-08-10 23:58:27 -04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-11-07 13:53:56 -05:00
|
|
|
</article>
|
2021-08-10 23:58:27 -04:00
|
|
|
</div>
|
2026-06-30 05:42:09 +03:00
|
|
|
<ThreadTree
|
2021-08-08 12:40:17 -04:00
|
|
|
v-for="status in showingTopLevel"
|
|
|
|
|
:key="status.id"
|
|
|
|
|
ref="statusComponent"
|
|
|
|
|
:depth="0"
|
2021-08-06 20:18:27 -04:00
|
|
|
|
2021-08-08 12:40:17 -04:00
|
|
|
:status="status"
|
|
|
|
|
:in-profile="inProfile"
|
|
|
|
|
:conversation="conversation"
|
|
|
|
|
:collapsable="collapsable"
|
|
|
|
|
:is-expanded="isExpanded"
|
|
|
|
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
|
|
|
|
:profile-user-id="profileUserId"
|
2021-08-06 20:18:27 -04:00
|
|
|
|
2021-08-08 12:40:17 -04:00
|
|
|
:get-replies="getReplies"
|
2026-07-06 19:43:08 +03:00
|
|
|
:focused="maybeFocused"
|
2021-08-08 12:40:17 -04:00
|
|
|
:toggle-expanded="toggleExpanded"
|
2021-08-07 00:33:06 -04:00
|
|
|
|
2021-08-08 12:40:17 -04:00
|
|
|
:simple="treeViewIsSimple"
|
|
|
|
|
:thread-display-status="threadDisplayStatus"
|
|
|
|
|
:show-thread-recursively="showThreadRecursively"
|
|
|
|
|
:total-reply-count="totalReplyCount"
|
|
|
|
|
:total-reply-depth="totalReplyDepth"
|
2026-06-30 06:00:41 +03:00
|
|
|
:can-dive="canDive"
|
2026-06-30 06:17:17 +03:00
|
|
|
|
2026-07-06 19:43:08 +03:00
|
|
|
@goto="setFocused"
|
2026-06-30 06:00:41 +03:00
|
|
|
@dive="diveIntoStatus"
|
2026-06-30 05:42:09 +03:00
|
|
|
@suspendable-state-change="onStatusSuspendStateChange"
|
2021-08-08 12:40:17 -04:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-07-24 16:22:56 +03:00
|
|
|
v-else-if="isLinearView"
|
2021-08-08 12:40:17 -04:00
|
|
|
class="thread-body"
|
|
|
|
|
>
|
2022-11-07 13:53:56 -05:00
|
|
|
<article>
|
2026-06-30 05:42:09 +03:00
|
|
|
<Status
|
2022-11-07 13:53:56 -05:00
|
|
|
v-for="status in conversation"
|
|
|
|
|
:key="status.id"
|
|
|
|
|
ref="statusComponent"
|
2026-02-15 21:31:52 +02:00
|
|
|
class="conversation-status status-fadein panel-body"
|
2022-11-07 13:53:56 -05:00
|
|
|
:statusoid="status"
|
2026-02-15 21:31:52 +02:00
|
|
|
:replies="getReplies(status.id)"
|
|
|
|
|
|
2022-11-07 13:53:56 -05:00
|
|
|
:expandable="!isExpanded"
|
2026-07-06 19:43:08 +03:00
|
|
|
:focused="maybeFocused === status.id || maybeFocused === status.retweeted_status?.id"
|
2026-02-15 21:31:52 +02:00
|
|
|
:inline-expanded="collapsable && isExpanded"
|
|
|
|
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
2022-11-07 13:53:56 -05:00
|
|
|
:in-profile="inProfile"
|
2026-02-15 21:31:52 +02:00
|
|
|
:in-conversation="isExpanded"
|
2022-11-07 13:53:56 -05:00
|
|
|
:profile-user-id="profileUserId"
|
2021-08-07 11:59:10 -04:00
|
|
|
|
2026-07-06 19:43:08 +03:00
|
|
|
@goto="setFocused"
|
2025-02-04 14:14:31 +02:00
|
|
|
@toggle-expanded="toggleExpanded"
|
2026-06-30 05:42:09 +03:00
|
|
|
@suspendable-state-change="onStatusSuspendStateChange"
|
2022-11-07 13:53:56 -05:00
|
|
|
/>
|
|
|
|
|
</article>
|
2021-08-08 12:40:17 -04:00
|
|
|
</div>
|
2026-07-09 01:08:09 +03:00
|
|
|
</div>
|
2016-11-24 18:17:09 +01:00
|
|
|
</div>
|
2020-09-29 10:18:37 +00:00
|
|
|
<div
|
|
|
|
|
v-else
|
2024-03-25 16:38:03 +02:00
|
|
|
class="Conversation -hidden"
|
2020-09-29 10:18:37 +00:00
|
|
|
:style="hiddenStyle"
|
|
|
|
|
/>
|
2016-11-24 18:17:09 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script src="./conversation.js"></script>
|
2026-07-09 01:08:09 +03:00
|
|
|
<style src="./conversation.scss" />
|