2016-11-24 18:17:09 +01:00
|
|
|
<template>
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
2026-09-09 01:15:58 +03:00
|
|
|
ref="root"
|
2020-07-28 01:27:11 +03:00
|
|
|
class="Conversation"
|
2026-09-07 18:07:01 +03:00
|
|
|
:class="{ '-expanded' : isExpanded, '-page': isPage, '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
|
2026-09-08 16:11:08 +03:00
|
|
|
v-if="!isPage"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="button-unstyled -link"
|
|
|
|
|
@click.prevent="toggleExpanded"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('timeline.collapse') }}
|
|
|
|
|
</button>
|
2022-08-01 23:20:27 +03:00
|
|
|
<QuickFilterSettings
|
2026-09-08 16:11:08 +03:00
|
|
|
v-if="isPage && 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
|
2026-09-08 16:11:08 +03:00
|
|
|
v-if="isPage"
|
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
|
|
|
/>
|
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"
|
2026-09-09 01:15:58 +03:00
|
|
|
ref="body"
|
2024-04-14 11:46:29 -04:00
|
|
|
: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"
|
2026-09-09 01:15:58 +03:00
|
|
|
ref="body"
|
2024-03-04 18:24:29 +02:00
|
|
|
: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>
|
2026-09-08 03:01:22 +03:00
|
|
|
{{ $t('status.show_all_conversation', { numStatus: topLevel.length - 1 }, topLevel.length - 1) }}
|
2022-03-23 16:31:34 +02:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2022-03-06 13:50:15 -05:00
|
|
|
</div>
|
2026-09-08 16:11:08 +03:00
|
|
|
<div
|
2021-09-15 23:35:17 -04:00
|
|
|
v-if="shouldShowAncestors"
|
2021-08-10 23:58:27 -04:00
|
|
|
class="thread-ancestors"
|
|
|
|
|
>
|
2026-09-08 16:11:08 +03:00
|
|
|
<article
|
|
|
|
|
v-for="status in currentAncestors"
|
|
|
|
|
class="thread-ancestor"
|
2026-09-08 17:17:24 +03:00
|
|
|
:class="{'thread-ancestor-has-other-replies': statusReplies.size > 1, '-faded': shouldFadeAncestors}"
|
2026-09-08 16:11:08 +03:00
|
|
|
>
|
|
|
|
|
<Status
|
|
|
|
|
class="conversation-status panel-body"
|
|
|
|
|
:class="getStatusClasses(status)"
|
2026-02-15 21:31:52 +02:00
|
|
|
|
2026-09-08 16:11:08 +03:00
|
|
|
:status-id="status.id"
|
2026-09-08 17:17:24 +03:00
|
|
|
:replies="statusReplies"
|
2026-02-15 21:31:52 +02:00
|
|
|
|
2026-09-08 16:11:08 +03:00
|
|
|
:focused="focused === status.id"
|
|
|
|
|
can-dive
|
2021-08-10 23:58:27 -04:00
|
|
|
|
2026-09-08 16:11:08 +03:00
|
|
|
@goto="setFocused"
|
2026-09-08 17:17:24 +03:00
|
|
|
@dive="diveIntoStatus(status.id)"
|
2026-09-08 16:11:08 +03:00
|
|
|
@suspendable-state-change="onStatusSuspendStateChange"
|
2026-09-08 17:44:16 +03:00
|
|
|
@height-change="updateVirtualHeight"
|
2026-09-08 16:11:08 +03:00
|
|
|
/>
|
|
|
|
|
<div
|
2026-09-08 17:17:24 +03:00
|
|
|
v-if="shouldShowOtherRepliesButton && statusReplies.size > 1"
|
2026-09-08 16:11:08 +03:00
|
|
|
class="thread-ancestor-dive-box"
|
|
|
|
|
>
|
2021-08-10 23:58:27 -04:00
|
|
|
<div
|
2026-09-08 16:11:08 +03:00
|
|
|
class="thread-ancestor-dive-box-inner"
|
2021-08-10 23:58:27 -04:00
|
|
|
>
|
2026-09-08 16:11:08 +03:00
|
|
|
<i18n-t
|
|
|
|
|
tag="button"
|
|
|
|
|
scope="global"
|
|
|
|
|
keypath="status.ancestor_follow_with_icon"
|
|
|
|
|
class="button-unstyled -link thread-tree-show-replies-button"
|
|
|
|
|
@click.prevent="diveIntoStatus(status.id)"
|
2021-08-10 23:58:27 -04:00
|
|
|
>
|
2026-09-08 16:11:08 +03:00
|
|
|
<template #icon>
|
|
|
|
|
<FAIcon
|
|
|
|
|
icon="angle-double-right"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #text>
|
|
|
|
|
<span>
|
2026-09-08 17:17:24 +03:00
|
|
|
{{ $t('status.ancestor_follow', { numReplies: statusReplies.size - 1 }) }}
|
2026-09-08 16:11:08 +03:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2021-08-10 23:58:27 -04:00
|
|
|
</div>
|
2026-09-08 16:11:08 +03:00
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
</div>
|
2026-06-30 05:42:09 +03:00
|
|
|
<ThreadTree
|
2026-09-08 17:17:24 +03:00
|
|
|
:status-id="status.id"
|
2026-09-08 16:11:08 +03:00
|
|
|
:depth="0"
|
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-09-08 03:01:22 +03:00
|
|
|
@toggle-expanded="toggleExpanded"
|
|
|
|
|
@show-thread-recursively="showThreadRecursively"
|
2026-06-30 05:42:09 +03:00
|
|
|
@suspendable-state-change="onStatusSuspendStateChange"
|
2026-09-08 17:44:16 +03:00
|
|
|
@height-change="updateVirtualHeight"
|
2021-08-08 12:40:17 -04:00
|
|
|
/>
|
|
|
|
|
</div>
|
2026-09-08 17:21:06 +03:00
|
|
|
<div
|
2026-07-24 16:22:56 +03:00
|
|
|
v-else-if="isLinearView"
|
2021-08-08 12:40:17 -04:00
|
|
|
class="thread-body"
|
|
|
|
|
>
|
2026-09-08 17:21:06 +03:00
|
|
|
<article
|
2026-09-09 01:15:58 +03:00
|
|
|
v-for="element in heightChartLinear"
|
2026-09-08 17:21:06 +03:00
|
|
|
class="panel-body"
|
2026-09-09 01:15:58 +03:00
|
|
|
:key="element.id ?? element.ids"
|
2026-09-08 17:21:06 +03:00
|
|
|
>
|
2026-09-09 01:15:58 +03:00
|
|
|
<div
|
|
|
|
|
v-if="element.type === 'spacer'"
|
|
|
|
|
class="virtual-spacer"
|
|
|
|
|
:style="{ height: element.height + 'px' }"
|
|
|
|
|
/>
|
2026-09-08 17:21:06 +03:00
|
|
|
<Status
|
2026-09-09 01:15:58 +03:00
|
|
|
v-if="element.type === 'status'"
|
2026-09-08 17:21:06 +03:00
|
|
|
class="conversation-status"
|
|
|
|
|
:class="getStatusClasses(status)"
|
2026-09-09 01:15:58 +03:00
|
|
|
:status-id="element.status.id"
|
2026-09-08 17:21:06 +03:00
|
|
|
:replies="getReplies(status.id)"
|
2026-02-15 21:31:52 +02:00
|
|
|
|
2026-09-09 01:15:58 +03:00
|
|
|
:focused="focused === element.id || focused === element.status.retweeted_status?.id"
|
2021-08-07 11:59:10 -04:00
|
|
|
|
2026-09-08 17:21:06 +03:00
|
|
|
@goto="setFocused"
|
|
|
|
|
@toggle-expanded="toggleExpanded"
|
|
|
|
|
@suspendable-state-change="onStatusSuspendStateChange"
|
2026-09-08 17:44:16 +03:00
|
|
|
@height-change="updateVirtualHeight"
|
2026-09-08 17:21:06 +03:00
|
|
|
/>
|
|
|
|
|
</article>
|
|
|
|
|
</div>
|
2026-07-09 01:08:09 +03:00
|
|
|
</div>
|
2016-11-24 18:17:09 +01:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script src="./conversation.js"></script>
|
2026-07-09 01:08:09 +03:00
|
|
|
<style src="./conversation.scss" />
|