2016-11-24 17:17:09 +00:00
|
|
|
<template>
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
2020-09-29 10:18:37 +00:00
|
|
|
v-if="!hideStatus"
|
|
|
|
:style="hiddenStyle"
|
2020-07-27 22:27:11 +00:00
|
|
|
class="Conversation"
|
|
|
|
:class="{ '-expanded' : isExpanded, 'panel' : isExpanded }"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-if="isExpanded"
|
|
|
|
class="panel-heading conversation-heading"
|
|
|
|
>
|
2018-08-30 17:16:36 +00:00
|
|
|
<span class="title"> {{ $t('timeline.conversation') }} </span>
|
2020-11-24 10:32:42 +00:00
|
|
|
<button
|
|
|
|
v-if="collapsable"
|
|
|
|
class="button-unstyled -link"
|
|
|
|
@click.prevent="toggleExpanded"
|
|
|
|
>
|
|
|
|
{{ $t('timeline.collapse') }}
|
|
|
|
</button>
|
2017-02-04 12:52:26 +00:00
|
|
|
</div>
|
2021-08-08 16:40:17 +00:00
|
|
|
<div class="conversation-body panel-body">
|
|
|
|
<div
|
|
|
|
v-if="diveMode"
|
|
|
|
class="conversation-undive-box"
|
2021-08-07 15:59:10 +00:00
|
|
|
>
|
2021-08-08 16:40:17 +00:00
|
|
|
<i18n
|
|
|
|
path="status.show_all_conversation"
|
|
|
|
tag="button"
|
|
|
|
class="button-unstyled -link"
|
|
|
|
@click.prevent="undive"
|
|
|
|
>
|
|
|
|
<FAIcon icon="angle-double-left" />
|
|
|
|
</i18n>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-if="diveMode"
|
|
|
|
class="conversation-undive-box"
|
2021-08-07 18:11:34 +00:00
|
|
|
>
|
2021-08-08 16:40:17 +00:00
|
|
|
<i18n
|
|
|
|
path="status.return_to_last_showing"
|
|
|
|
tag="button"
|
|
|
|
class="button-unstyled -link"
|
|
|
|
@click.prevent="diveBack"
|
|
|
|
>
|
|
|
|
<FAIcon icon="chevron-left" />
|
|
|
|
</i18n>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-if="isTreeView"
|
|
|
|
class="thread-body"
|
|
|
|
>
|
|
|
|
<thread-tree
|
|
|
|
v-for="status in showingTopLevel"
|
|
|
|
:key="status.id"
|
|
|
|
ref="statusComponent"
|
|
|
|
:depth="0"
|
2021-08-07 00:18:27 +00:00
|
|
|
|
2021-08-08 16:40:17 +00:00
|
|
|
:status="status"
|
|
|
|
:in-profile="inProfile"
|
|
|
|
:conversation="conversation"
|
|
|
|
:collapsable="collapsable"
|
|
|
|
:is-expanded="isExpanded"
|
|
|
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
|
|
|
:profile-user-id="profileUserId"
|
2021-08-07 00:18:27 +00:00
|
|
|
|
2021-08-08 16:40:17 +00:00
|
|
|
:focused="focused"
|
|
|
|
:get-replies="getReplies"
|
|
|
|
:highlight="maybeHighlight"
|
|
|
|
:set-highlight="setHighlight"
|
|
|
|
:toggle-expanded="toggleExpanded"
|
2021-08-07 04:33:06 +00:00
|
|
|
|
2021-08-08 16:40:17 +00: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"
|
|
|
|
>
|
|
|
|
<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"
|
|
|
|
class="conversation-status status-fadein panel-body"
|
2021-08-07 15:59:10 +00:00
|
|
|
|
2021-08-08 16:40:17 +00: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 15:59:10 +00:00
|
|
|
|
2021-08-08 16:40:17 +00:00
|
|
|
@goto="setHighlight"
|
|
|
|
@toggleExpanded="toggleExpanded"
|
|
|
|
/>
|
|
|
|
</div>
|
2021-08-07 00:18:27 +00:00
|
|
|
</div>
|
2016-11-24 17:17:09 +00:00
|
|
|
</div>
|
2020-09-29 10:18:37 +00:00
|
|
|
<div
|
|
|
|
v-else
|
|
|
|
:style="hiddenStyle"
|
|
|
|
/>
|
2016-11-24 17:17:09 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./conversation.js"></script>
|
2019-03-11 20:24:37 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2020-07-27 22:27:11 +00:00
|
|
|
.Conversation {
|
2021-08-07 15:59:10 +00:00
|
|
|
.conversation-undive-box {
|
2021-08-08 16:40:17 +00:00
|
|
|
padding: $status-margin;
|
2021-08-08 16:55:04 +00:00
|
|
|
border-bottom-width: 1px;
|
|
|
|
border-bottom-style: solid;
|
|
|
|
border-bottom-color: var(--border, $fallback--border);
|
|
|
|
border-radius: 0;
|
2021-08-07 15:59:10 +00:00
|
|
|
}
|
2021-08-08 16:40:17 +00:00
|
|
|
|
|
|
|
/* HACK: we want the border width to scale with the status *below it* */
|
2020-07-27 22:27:11 +00:00
|
|
|
.conversation-status {
|
2021-08-08 16:40:17 +00:00
|
|
|
border-top-width: 1px;
|
|
|
|
border-top-style: solid;
|
|
|
|
border-top-color: var(--border, $fallback--border);
|
2020-07-27 22:27:11 +00:00
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
|
2021-08-08 16:40:17 +00:00
|
|
|
&.-expanded .conversation-body .thread-tree:nth-child(1) > .conversation-status {
|
|
|
|
border-top-left-radius: $fallback--panelRadius;
|
|
|
|
border-top-left-radius: var(--panelRadius, $fallback--panelRadius);
|
|
|
|
}
|
|
|
|
|
2021-08-08 16:55:04 +00:00
|
|
|
/* first element in a reply tree, the border is supplied by reply tree instead
|
|
|
|
for radius to display properly
|
|
|
|
*/
|
2021-08-08 16:40:17 +00:00
|
|
|
&.-expanded .conversation-body {
|
|
|
|
.conversation-undive-box:nth-child(1),
|
|
|
|
& > .conversation-status:nth-child(1),
|
2021-08-08 16:55:04 +00:00
|
|
|
& > .thread-body:nth-child(1) > .thread-tree:nth-child(1) > .conversation-status:nth-child(1),
|
|
|
|
.thread-tree:nth-child(1) > .conversation-status:nth-child(1) {
|
2021-08-08 16:40:17 +00:00
|
|
|
border-top: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* first unexpanded statuses in timeline */
|
|
|
|
&:first-child:not(.-expanded) {
|
|
|
|
.conversation-body {
|
|
|
|
.conversation-status {
|
|
|
|
border-top: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* expanded conversation in timeline */
|
|
|
|
&.status-fadein.-expanded .thread-body {
|
|
|
|
border-left-width: 4px;
|
|
|
|
border-left-style: solid;
|
|
|
|
border-left-color: $fallback--cRed;
|
|
|
|
border-left-color: var(--cRed, $fallback--cRed);
|
|
|
|
border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;
|
|
|
|
border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);
|
|
|
|
border-bottom: 1px solid var(--border, $fallback--border);
|
|
|
|
}
|
2020-07-27 22:27:11 +00:00
|
|
|
&.-expanded {
|
|
|
|
.conversation-status:last-child {
|
|
|
|
border-bottom: none;
|
|
|
|
}
|
|
|
|
}
|
2019-03-11 20:24:37 +00:00
|
|
|
}
|
|
|
|
</style>
|