2021-06-07 16:50:26 +00:00
|
|
|
<template>
|
2021-06-22 17:47:35 +00:00
|
|
|
<div
|
|
|
|
class="StatusBody"
|
2022-11-02 22:33:54 +00:00
|
|
|
:class="{ '-compact': compact, 'mfm-disabled': !renderMisskeyMarkdown }"
|
2021-06-17 23:27:32 +00:00
|
|
|
>
|
2021-06-07 16:50:26 +00:00
|
|
|
<div class="body">
|
|
|
|
<div
|
2021-06-12 17:42:17 +00:00
|
|
|
v-if="status.summary_raw_html"
|
2021-06-07 16:50:26 +00:00
|
|
|
class="summary-wrapper"
|
|
|
|
:class="{ '-tall': (longSubject && !showingLongSubject) }"
|
|
|
|
>
|
|
|
|
<RichContent
|
|
|
|
class="media-body summary"
|
|
|
|
:html="status.summary_raw_html"
|
|
|
|
:emoji="status.emojis"
|
|
|
|
/>
|
|
|
|
<button
|
2022-04-20 00:20:18 +00:00
|
|
|
v-show="longSubject && showingLongSubject"
|
2021-06-07 16:50:26 +00:00
|
|
|
class="button-unstyled -link tall-subject-hider"
|
2021-11-22 16:20:22 +00:00
|
|
|
@click.prevent="toggleShowingLongSubject"
|
2021-06-07 16:50:26 +00:00
|
|
|
>
|
|
|
|
{{ $t("status.hide_full_subject") }}
|
|
|
|
</button>
|
|
|
|
<button
|
2022-04-20 00:20:18 +00:00
|
|
|
v-show="longSubject && !showingLongSubject"
|
2021-06-07 16:50:26 +00:00
|
|
|
class="button-unstyled -link tall-subject-hider"
|
2021-11-22 16:20:22 +00:00
|
|
|
@click.prevent="toggleShowingLongSubject"
|
2021-06-07 16:50:26 +00:00
|
|
|
>
|
|
|
|
{{ $t("status.show_full_subject") }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
:class="{'-tall-status': hideTallStatus}"
|
|
|
|
class="text-wrapper"
|
|
|
|
>
|
|
|
|
<button
|
2022-04-20 00:20:18 +00:00
|
|
|
v-show="hideTallStatus"
|
2021-06-07 16:50:26 +00:00
|
|
|
class="button-unstyled -link tall-status-hider"
|
|
|
|
:class="{ '-focused': focused }"
|
|
|
|
@click.prevent="toggleShowMore"
|
|
|
|
>
|
|
|
|
{{ $t("general.show_more") }}
|
|
|
|
</button>
|
2022-06-14 14:57:02 +00:00
|
|
|
<div
|
2021-06-12 17:42:17 +00:00
|
|
|
v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)"
|
2022-07-29 03:32:45 +00:00
|
|
|
class="media-body-wrapper"
|
2022-06-14 14:57:02 +00:00
|
|
|
>
|
|
|
|
<RichContent
|
|
|
|
:class="{ '-single-line': singleLine }"
|
|
|
|
class="text media-body"
|
|
|
|
:html="status.raw_html"
|
|
|
|
:emoji="status.emojis"
|
|
|
|
:handle-links="true"
|
2022-07-15 09:57:17 +00:00
|
|
|
:mfm="renderMisskeyMarkdown && (status.media_type === 'text/x.misskeymarkdown')"
|
2022-06-14 14:57:02 +00:00
|
|
|
:greentext="mergedConfig.greentext"
|
|
|
|
:attentions="status.attentions"
|
|
|
|
@parseReady="onParseReady"
|
|
|
|
/>
|
2022-08-29 19:02:34 +00:00
|
|
|
<div
|
|
|
|
v-if="status.translation"
|
|
|
|
class="translation"
|
|
|
|
>
|
2022-09-12 15:47:53 +00:00
|
|
|
<h4>{{ $t(`languages.translated_from.${status.translation.detected_language.toLowerCase()}`) }}</h4>
|
2022-08-29 19:02:34 +00:00
|
|
|
<RichContent
|
|
|
|
:class="{ '-single-line': singleLine }"
|
|
|
|
class="text media-body"
|
|
|
|
:html="status.translation.text"
|
|
|
|
:emoji="status.emojis"
|
|
|
|
:handle-links="true"
|
|
|
|
:mfm="renderMisskeyMarkdown && (status.media_type === 'text/x.misskeymarkdown')"
|
|
|
|
:greentext="mergedConfig.greentext"
|
|
|
|
:attentions="status.attentions"
|
|
|
|
@parseReady="onParseReady"
|
|
|
|
/>
|
2022-08-30 14:43:57 +00:00
|
|
|
<div>
|
|
|
|
<label class="label">{{ $t('status.override_translation_source_language') }}</label>
|
|
|
|
{{ ' ' }}
|
|
|
|
<Select
|
|
|
|
id="source-language-switcher"
|
|
|
|
v-model="translateFrom"
|
|
|
|
class="preset-switcher"
|
|
|
|
>
|
|
|
|
<option
|
|
|
|
v-for="language in translationLanguages"
|
|
|
|
:key="language.key"
|
|
|
|
:value="language.value"
|
|
|
|
>
|
2022-09-12 15:47:53 +00:00
|
|
|
{{ $t(`languages.${language.value.toLowerCase()}`) }}
|
2022-08-30 14:43:57 +00:00
|
|
|
</option>
|
|
|
|
</Select>
|
|
|
|
{{ ' ' }}
|
|
|
|
<button @click="translateStatus" class="btn button-default">
|
|
|
|
{{ $t('status.translate') }}
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-08-29 19:02:34 +00:00
|
|
|
</div>
|
2022-06-14 14:57:02 +00:00
|
|
|
</div>
|
2021-06-07 16:50:26 +00:00
|
|
|
<button
|
2022-04-20 00:20:18 +00:00
|
|
|
v-show="hideSubjectStatus"
|
2021-06-07 16:50:26 +00:00
|
|
|
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
|
2022-04-20 00:20:18 +00:00
|
|
|
v-show="showingMore && !fullContent"
|
2021-06-07 16:50:26 +00:00
|
|
|
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" />
|