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
|
|
|
>
|
2018-08-30 20:16:36 +03:00
|
|
|
<span class="title"> {{ $t('timeline.conversation') }} </span>
|
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
|
|
|
|
v-if="!collapsable"
|
|
|
|
: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
|
|
|
|
class="conversation-body"
|
|
|
|
:class="{ 'panel-body': isExpanded }"
|
|
|
|
>
|
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>
|
|
|
|
{{ $tc('status.show_all_conversation', otherTopLevelCount, { numStatus: otherTopLevelCount }) }}
|
|
|
|
</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
|
|
|
>
|
|
|
|
<status
|
|
|
|
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"
|
2024-03-04 18:24:29 +02:00
|
|
|
class="conversation-status status-fadein"
|
2021-08-10 23:58:27 -04:00
|
|
|
|
2021-09-05 16:35:47 -04:00
|
|
|
:simple-tree="treeViewIsSimple"
|
2021-08-10 23:58:27 -04:00
|
|
|
:toggle-thread-display="toggleThreadDisplay"
|
|
|
|
:thread-display-status="threadDisplayStatus"
|
|
|
|
:show-thread-recursively="showThreadRecursively"
|
|
|
|
:total-reply-count="totalReplyCount"
|
|
|
|
:total-reply-depth="totalReplyDepth"
|
2021-09-05 16:35:47 -04:00
|
|
|
:show-other-replies-as-button="showOtherRepliesButtonInsideStatus"
|
|
|
|
:dive="() => diveIntoStatus(status.id)"
|
2021-08-10 23:58:27 -04:00
|
|
|
|
|
|
|
:controlled-showing-tall="statusContentProperties[status.id].showingTall"
|
|
|
|
:controlled-expanding-subject="statusContentProperties[status.id].expandingSubject"
|
|
|
|
:controlled-showing-long-subject="statusContentProperties[status.id].showingLongSubject"
|
2021-09-16 00:29:14 -04:00
|
|
|
:controlled-replying="statusContentProperties[status.id].replying"
|
|
|
|
:controlled-media-playing="statusContentProperties[status.id].mediaPlaying"
|
2021-08-10 23:58:27 -04:00
|
|
|
:controlled-toggle-showing-tall="() => toggleStatusContentProperty(status.id, 'showingTall')"
|
|
|
|
:controlled-toggle-expanding-subject="() => toggleStatusContentProperty(status.id, 'expandingSubject')"
|
|
|
|
:controlled-toggle-showing-long-subject="() => toggleStatusContentProperty(status.id, 'showingLongSubject')"
|
2021-09-16 00:29:14 -04:00
|
|
|
:controlled-toggle-replying="() => toggleStatusContentProperty(status.id, 'replying')"
|
|
|
|
:controlled-set-media-playing="(newVal) => toggleStatusContentProperty(status.id, 'mediaPlaying', newVal)"
|
2021-08-10 23:58:27 -04:00
|
|
|
|
|
|
|
@goto="setHighlight"
|
|
|
|
@toggleExpanded="toggleExpanded"
|
|
|
|
/>
|
|
|
|
<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>
|
|
|
|
{{ $tc('status.ancestor_follow', getReplies(status.id).length - 1, { numReplies: getReplies(status.id).length - 1 }) }}
|
|
|
|
</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>
|
2021-08-08 12:40:17 -04:00
|
|
|
<thread-tree
|
|
|
|
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
|
|
|
:focused="focused"
|
|
|
|
:get-replies="getReplies"
|
|
|
|
:highlight="maybeHighlight"
|
|
|
|
:set-highlight="setHighlight"
|
|
|
|
:toggle-expanded="toggleExpanded"
|
2021-08-07 00:33:06 -04:00
|
|
|
|
2021-08-08 12:40:17 -04:00
|
|
|
:simple="treeViewIsSimple"
|
|
|
|
:toggle-thread-display="toggleThreadDisplay"
|
|
|
|
:thread-display-status="threadDisplayStatus"
|
|
|
|
:show-thread-recursively="showThreadRecursively"
|
|
|
|
:total-reply-count="totalReplyCount"
|
|
|
|
:total-reply-depth="totalReplyDepth"
|
|
|
|
:status-content-properties="statusContentProperties"
|
|
|
|
:set-status-content-property="setStatusContentProperty"
|
|
|
|
:toggle-status-content-property="toggleStatusContentProperty"
|
|
|
|
:dive="canDive ? diveIntoStatus : undefined"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-if="isLinearView"
|
|
|
|
class="thread-body"
|
|
|
|
>
|
2022-11-07 13:53:56 -05:00
|
|
|
<article>
|
|
|
|
<status
|
|
|
|
v-for="status in conversation"
|
|
|
|
: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"
|
2024-03-04 18:24:29 +02:00
|
|
|
class="conversation-status status-fadein"
|
2021-08-07 11:59:10 -04:00
|
|
|
|
2022-11-07 13:53:56 -05:00
|
|
|
:toggle-thread-display="toggleThreadDisplay"
|
|
|
|
:thread-display-status="threadDisplayStatus"
|
|
|
|
:show-thread-recursively="showThreadRecursively"
|
|
|
|
:total-reply-count="totalReplyCount"
|
|
|
|
:total-reply-depth="totalReplyDepth"
|
|
|
|
:status-content-properties="statusContentProperties"
|
|
|
|
:set-status-content-property="setStatusContentProperty"
|
|
|
|
:toggle-status-content-property="toggleStatusContentProperty"
|
2021-08-07 11:59:10 -04:00
|
|
|
|
2022-11-07 13:53:56 -05:00
|
|
|
@goto="setHighlight"
|
|
|
|
@toggleExpanded="toggleExpanded"
|
|
|
|
/>
|
|
|
|
</article>
|
2021-08-08 12:40:17 -04:00
|
|
|
</div>
|
2021-08-06 20:18:27 -04:00
|
|
|
</div>
|
2016-11-24 18:17:09 +01:00
|
|
|
</div>
|
2020-09-29 10:18:37 +00:00
|
|
|
<div
|
|
|
|
v-else
|
|
|
|
:style="hiddenStyle"
|
|
|
|
/>
|
2016-11-24 18:17:09 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./conversation.js"></script>
|
2019-03-11 16:24:37 -04:00
|
|
|
|
|
|
|
<style lang="scss">
|
2020-07-28 01:27:11 +03:00
|
|
|
.Conversation {
|
2022-05-09 23:18:39 +03:00
|
|
|
z-index: 1;
|
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
.conversation-dive-to-top-level-box {
|
2024-03-04 19:45:42 +02:00
|
|
|
padding: var(--status-margin);
|
|
|
|
border-bottom: 1px solid var(--border);
|
2021-08-08 12:55:04 -04:00
|
|
|
border-radius: 0;
|
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 11:59:10 -04:00
|
|
|
}
|
2021-08-08 12:40:17 -04:00
|
|
|
|
2021-08-11 00:30:27 -04:00
|
|
|
.thread-ancestors {
|
2024-03-04 19:45:42 +02:00
|
|
|
margin-left: var(--status-margin);
|
|
|
|
border-left: 2px solid var(--border);
|
2021-08-11 00:30:27 -04:00
|
|
|
}
|
|
|
|
|
2024-03-04 19:45:42 +02:00
|
|
|
.thread-ancestor.-faded .RichContent {
|
|
|
|
/* stylelint-disable declaration-no-important */
|
|
|
|
--text: var(--textFaint) !important;
|
|
|
|
--link: var(--linkFaint) !important;
|
|
|
|
--funtextGreentext: var(--funtextGreentextFaint) !important;
|
|
|
|
--funtextCyantext: var(--funtextCyantextFaint) !important;
|
|
|
|
/* stylelint-enable declaration-no-important */
|
2021-08-10 23:58:27 -04:00
|
|
|
}
|
2022-04-25 23:50:22 +03:00
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
.thread-ancestor-dive-box {
|
2024-03-04 19:45:42 +02:00
|
|
|
padding-left: var(--status-margin);
|
|
|
|
border-bottom: 1px solid var(--border);
|
2021-08-10 23:58:27 -04:00
|
|
|
border-radius: 0;
|
2023-01-09 13:02:16 -05:00
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
/* Make the button stretch along the whole row */
|
2023-01-09 13:02:16 -05:00
|
|
|
&,
|
|
|
|
&-inner {
|
2021-08-13 18:53:31 -04:00
|
|
|
display: flex;
|
|
|
|
align-items: stretch;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
2021-08-10 23:58:27 -04:00
|
|
|
}
|
2023-01-09 13:02:16 -05:00
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
.thread-ancestor-dive-box-inner {
|
2024-03-04 19:45:42 +02:00
|
|
|
padding: var(--status-margin);
|
2021-08-10 23:58:27 -04:00
|
|
|
}
|
|
|
|
|
2020-07-28 01:27:11 +03:00
|
|
|
.conversation-status {
|
2024-03-04 19:45:42 +02:00
|
|
|
border-bottom: 1px solid var(--border);
|
2020-07-28 01:27:11 +03:00
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
|
2021-08-10 23:58:27 -04:00
|
|
|
.thread-ancestor-has-other-replies .conversation-status,
|
2024-02-19 00:21:44 +02:00
|
|
|
&:last-child:not(.-expanded) .conversation-status,
|
|
|
|
&.-expanded .conversation-status:last-child,
|
2021-08-11 00:49:38 -04:00
|
|
|
.thread-ancestor:last-child .conversation-status,
|
|
|
|
.thread-ancestor:last-child .thread-ancestor-dive-box,
|
2021-08-10 21:28:13 -04:00
|
|
|
&.-expanded .thread-tree .conversation-status {
|
|
|
|
border-bottom: none;
|
2021-08-08 12:40:17 -04:00
|
|
|
}
|
|
|
|
|
2021-08-11 00:49:38 -04:00
|
|
|
.thread-ancestors + .thread-tree > .conversation-status {
|
2024-03-04 19:45:42 +02:00
|
|
|
border-top: 1px solid var(--border);
|
2021-08-11 00:49:38 -04:00
|
|
|
}
|
|
|
|
|
2021-08-08 12:40:17 -04:00
|
|
|
/* expanded conversation in timeline */
|
|
|
|
&.status-fadein.-expanded .thread-body {
|
2024-02-13 02:27:53 +02:00
|
|
|
border-left: 4px solid var(--cRed);
|
|
|
|
border-radius: var(--roundness);
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
border-bottom: 1px solid var(--border);
|
2021-08-08 12:40:17 -04:00
|
|
|
}
|
2022-04-10 19:28:52 +03:00
|
|
|
|
|
|
|
&.-expanded.status-fadein {
|
2024-03-04 18:24:29 +02:00
|
|
|
background: var(--background);
|
2024-03-04 19:45:42 +02:00
|
|
|
padding: calc(var(--status-margin) / 2);
|
2022-04-10 14:47:47 +03:00
|
|
|
}
|
2019-03-11 16:24:37 -04:00
|
|
|
}
|
|
|
|
</style>
|