akkoma-fe/src/components/status_content/status_content.vue

104 lines
2.3 KiB
Vue
Raw Normal View History

<template>
2021-06-22 17:47:35 +00:00
<div
class="StatusContent"
:class="{ '-compact': compact, 'mfm-hover': renderMfmOnHover, 'mfm-disabled': !renderMisskeyMarkdown }"
2021-06-22 17:47:35 +00:00
>
<slot name="header" />
2021-06-07 16:51:04 +00:00
<StatusBody
:status="status"
2021-06-13 23:52:41 +00:00
:compact="compact"
2021-06-07 16:51:04 +00:00
:single-line="singleLine"
2021-09-09 04:03:10 +00:00
:showing-tall="showingTall"
:expanding-subject="expandingSubject"
:showing-long-subject="showingLongSubject"
:toggle-showing-tall="toggleShowingTall"
:toggle-expanding-subject="toggleExpandingSubject"
:toggle-showing-long-subject="toggleShowingLongSubject"
2021-06-14 07:30:08 +00:00
@parseReady="$emit('parseReady', $event)"
>
<div v-if="status.poll && status.poll.options && !compact">
<Poll
:base-poll="status.poll"
:emoji="status.emojis"
/>
</div>
<div v-else-if="status.poll && status.poll.options && compact">
<FAIcon
icon="poll-h"
size="2x"
/>
</div>
<gallery
v-if="status.attachments.length !== 0"
2021-06-22 17:47:35 +00:00
class="attachments media-body"
:nsfw="nsfwClickthrough"
:attachments="status.attachments"
2021-06-22 17:47:35 +00:00
:limit="compact ? 1 : 0"
:size="attachmentSize"
@play="$emit('mediaplay', attachment.id)"
@pause="$emit('mediapause', attachment.id)"
/>
<div
v-if="status.quote && !compact"
class="quote"
>
<QuoteCard
:status="status.quote"
/>
</div>
<div
2021-06-13 23:52:41 +00:00
v-if="status.card && !noHeading && !compact"
class="link-preview media-body"
>
<link-preview
:card="status.card"
:size="attachmentSize"
:nsfw="nsfwClickthrough"
/>
</div>
</StatusBody>
<slot name="footer" />
</div>
</template>
<script src="./status_content.js" ></script>
<style lang="scss">
2020-07-27 22:27:11 +00:00
.StatusContent {
flex: 1;
min-width: 0;
img, video {
&.emoji {
width: 50px;
height: 50px;
}
}
&.mfm-hover:not(:hover) {
.mfm {
animation: none !important;
}
}
&.mfm-disabled {
span {
font-size: 100% !important;
}
.mfm {
animation: none !important;
}
.emoji {
width: 32px !important;
height: 32px !important;
}
}
}
2022-08-07 07:57:21 +00:00
.quote-inline,
.quote + .link-preview {
display: none;
}
</style>