2021-06-07 09:50:26 -07:00
|
|
|
<template>
|
|
|
|
<div class="StatusBody">
|
|
|
|
<div class="body">
|
|
|
|
<div
|
|
|
|
v-if="status.summary_html"
|
|
|
|
class="summary-wrapper"
|
|
|
|
:class="{ '-tall': (longSubject && !showingLongSubject) }"
|
|
|
|
>
|
|
|
|
<RichContent
|
|
|
|
class="media-body summary"
|
|
|
|
:html="status.summary_raw_html"
|
|
|
|
:emoji="status.emojis"
|
|
|
|
/>
|
|
|
|
<button
|
|
|
|
v-if="longSubject && showingLongSubject"
|
|
|
|
class="button-unstyled -link tall-subject-hider"
|
|
|
|
@click.prevent="showingLongSubject=false"
|
|
|
|
>
|
|
|
|
{{ $t("status.hide_full_subject") }}
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-else-if="longSubject"
|
|
|
|
class="button-unstyled -link tall-subject-hider"
|
|
|
|
@click.prevent="showingLongSubject=true"
|
|
|
|
>
|
|
|
|
{{ $t("status.show_full_subject") }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
:class="{'-tall-status': hideTallStatus}"
|
|
|
|
class="text-wrapper"
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
v-if="hideTallStatus"
|
|
|
|
class="button-unstyled -link tall-status-hider"
|
|
|
|
:class="{ '-focused': focused }"
|
|
|
|
@click.prevent="toggleShowMore"
|
|
|
|
>
|
|
|
|
{{ $t("general.show_more") }}
|
|
|
|
</button>
|
2021-06-11 01:05:28 -07:00
|
|
|
<span v-if="!hideSubjectStatus && !(singleLine && status.summary_html)">
|
|
|
|
<MentionsLine
|
|
|
|
v-if="!hideMentions && firstMentions && firstMentions.length > 0"
|
|
|
|
:mentions="firstMentions"
|
|
|
|
/>
|
2021-06-08 04:34:47 -07:00
|
|
|
<RichContent
|
|
|
|
:class="{ '-single-line': singleLine }"
|
|
|
|
class="text media-body"
|
2021-06-10 02:08:31 -07:00
|
|
|
:html="status.raw_html"
|
2021-06-08 04:34:47 -07:00
|
|
|
:emoji="status.emojis"
|
|
|
|
:handle-links="true"
|
2021-06-10 17:11:58 -07:00
|
|
|
:hide-mentions="hideMentions"
|
2021-06-10 02:08:31 -07:00
|
|
|
:greentext="mergedConfig.greentext"
|
2021-06-10 17:11:58 -07:00
|
|
|
@parseReady="setHeadTailLinks"
|
2021-06-11 01:52:50 -07:00
|
|
|
/>
|
2021-06-11 01:05:28 -07:00
|
|
|
<MentionsLine
|
|
|
|
v-if="!hideMentions && lastMentions.length > 0 && firstMentions.length === 0"
|
|
|
|
:mentions="lastMentions"
|
|
|
|
/>
|
2021-06-08 04:34:47 -07:00
|
|
|
</span>
|
|
|
|
|
2021-06-07 09:50:26 -07:00
|
|
|
<button
|
|
|
|
v-if="hideSubjectStatus"
|
|
|
|
class="button-unstyled -link cw-status-hider"
|
|
|
|
@click.prevent="toggleShowMore"
|
|
|
|
>
|
|
|
|
{{ $t("status.show_content") }}
|
|
|
|
<FAIcon
|
|
|
|
v-if="attachmentTypes.includes('image')"
|
|
|
|
icon="image"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-if="attachmentTypes.includes('video')"
|
|
|
|
icon="video"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-if="attachmentTypes.includes('audio')"
|
|
|
|
icon="music"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-if="attachmentTypes.includes('unknown')"
|
|
|
|
icon="file"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-if="status.poll && status.poll.options"
|
|
|
|
icon="poll-h"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-if="status.card"
|
|
|
|
icon="link"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-if="showingMore && !fullContent"
|
|
|
|
class="button-unstyled -link status-unhider"
|
|
|
|
@click.prevent="toggleShowMore"
|
|
|
|
>
|
|
|
|
{{ tallStatus ? $t("general.show_less") : $t("status.hide_content") }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<slot v-if="!hideSubjectStatus" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script src="./status_body.js" ></script>
|
|
|
|
<style lang="scss" src="./status_body.scss" />
|