pleroma-fe/src/components/conversation/conversation.vue

68 lines
1.7 KiB
Vue
Raw Normal View History

<template>
2019-07-05 09:17:44 +02:00
<div
2020-09-29 12:18:37 +02:00
v-if="!hideStatus"
:style="hiddenStyle"
2020-07-28 00:27:11 +02:00
class="Conversation"
:class="{ '-expanded' : isExpanded, 'panel' : isExpanded }"
2019-07-05 09:17:44 +02:00
>
<div
v-if="isExpanded"
class="panel-heading conversation-heading"
>
2018-08-30 19:16:36 +02:00
<span class="title"> {{ $t('timeline.conversation') }} </span>
<span v-if="collapsable">
2019-07-05 09:17:44 +02:00
<a
href="#"
@click.prevent="toggleExpanded"
>{{ $t('timeline.collapse') }}</a>
</span>
</div>
<status
v-for="status in conversation"
:key="status.id"
2020-09-29 12:18:37 +02:00
ref="statusComponent"
2019-07-05 09:17:44 +02:00
:inline-expanded="collapsable && isExpanded"
:statusoid="status"
2019-07-05 09:17:44 +02:00
:expandable="!isExpanded"
2019-08-15 19:16:55 +02:00
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="focused(status.id)"
2019-07-05 09:17:44 +02:00
:in-conversation="isExpanded"
:highlight="getHighlight()"
:replies="getReplies(status.id)"
2019-09-13 22:55:17 +02:00
:in-profile="inProfile"
:profile-user-id="profileUserId"
2020-07-28 00:27:11 +02:00
class="conversation-status status-fadein panel-body"
2019-07-06 22:52:10 +02:00
@goto="setHighlight"
2019-07-05 09:17:44 +02:00
@toggleExpanded="toggleExpanded"
/>
</div>
2020-09-29 12:18:37 +02:00
<div
v-else
:style="hiddenStyle"
/>
</template>
<script src="./conversation.js"></script>
2019-03-11 21:24:37 +01:00
<style lang="scss">
@import '../../_variables.scss';
2020-07-28 00:27:11 +02:00
.Conversation {
.conversation-status {
border-left: none;
border-bottom-width: 1px;
border-bottom-style: solid;
2020-08-04 18:32:47 +02:00
border-bottom-color: var(--border, $fallback--border);
2020-07-28 00:27:11 +02:00
border-radius: 0;
}
&.-expanded {
.conversation-status:last-child {
border-bottom: none;
2020-08-04 18:32:47 +02:00
border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;
border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);
2020-07-28 00:27:11 +02:00
}
}
2019-03-11 21:24:37 +01:00
}
</style>