|
|
@ -45,15 +45,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
<i v-else-if="note.visibility === 'followers'" class="ti ti-lock"></i>
|
|
|
|
<i v-else-if="note.visibility === 'followers'" class="ti ti-lock"></i>
|
|
|
|
<i v-else-if="note.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
|
|
|
<i v-else-if="note.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span v-if="note.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i
|
|
|
|
<span v-if="note.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
|
|
|
class="ti ti-rocket-off"></i></span>
|
|
|
|
|
|
|
|
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ti ti-device-tv"></i></span>
|
|
|
|
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ti ti-device-tv"></i></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="renoteCollapsed" :class="$style.collapsedRenoteTarget">
|
|
|
|
<div v-if="renoteCollapsed" :class="$style.collapsedRenoteTarget">
|
|
|
|
<MkAvatar :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/>
|
|
|
|
<MkAvatar :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/>
|
|
|
|
<Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user"
|
|
|
|
<Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :class="$style.collapsedRenoteTargetText" @click="renoteCollapsed = false"/>
|
|
|
|
:class="$style.collapsedRenoteTargetText" @click="renoteCollapsed = false"/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
|
|
|
|
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
|
|
|
|
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
|
|
|
|
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
|
|
|
@ -63,21 +61,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
|
|
|
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
|
|
|
<div style="container-type: inline-size;">
|
|
|
|
<div style="container-type: inline-size;">
|
|
|
|
<p v-if="appearNote.cw != null" :class="$style.cw">
|
|
|
|
<p v-if="appearNote.cw != null" :class="$style.cw">
|
|
|
|
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user"
|
|
|
|
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :i="$i"/>
|
|
|
|
:i="$i"/>
|
|
|
|
|
|
|
|
<MkCwButton v-model="showContent" :note="appearNote" style="margin: 4px 0;"/>
|
|
|
|
<MkCwButton v-model="showContent" :note="appearNote" style="margin: 4px 0;"/>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<div v-show="appearNote.cw == null || showContent" :class="[{ [$style.contentCollapsed]: collapsed }]">
|
|
|
|
<div v-show="appearNote.cw == null || showContent" :class="[{ [$style.contentCollapsed]: collapsed }]">
|
|
|
|
<div :class="$style.text">
|
|
|
|
<div :class="$style.text">
|
|
|
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
|
|
|
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
|
|
|
|
<MkA v-if="appearNote.replyId" :class="$style.replyIcon" :to="`/notes/${appearNote.replyId}`"><i
|
|
|
|
<MkA v-if="appearNote.replyId" :class="$style.replyIcon" :to="`/notes/${appearNote.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
|
|
|
|
class="ti ti-arrow-back-up"></i></MkA>
|
|
|
|
<Mfm v-if="appearNote.text" :text="appearNote.text" :author="appearNote.user" :i="$i" :emojiUrls="appearNote.emojis"/>
|
|
|
|
<Mfm v-if="appearNote.text" :text="appearNote.text" :author="appearNote.user" :i="$i"
|
|
|
|
|
|
|
|
:emojiUrls="appearNote.emojis"/>
|
|
|
|
|
|
|
|
<div v-if="translating || translation" :class="$style.translation">
|
|
|
|
<div v-if="translating || translation" :class="$style.translation">
|
|
|
|
<MkLoading v-if="translating" mini/>
|
|
|
|
<MkLoading v-if="translating" mini/>
|
|
|
|
<div v-else>
|
|
|
|
<div v-else>
|
|
|
|
<b>{{ i18n.t('translatedFrom', {x: translation.sourceLang}) }}: </b>
|
|
|
|
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
|
|
|
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :emojiUrls="appearNote.emojis"/>
|
|
|
|
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :emojiUrls="appearNote.emojis"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -86,11 +81,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
<MkMediaList :mediaList="appearNote.files"/>
|
|
|
|
<MkMediaList :mediaList="appearNote.files"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<MkPoll v-if="appearNote.poll" :note="appearNote" :class="$style.poll"/>
|
|
|
|
<MkPoll v-if="appearNote.poll" :note="appearNote" :class="$style.poll"/>
|
|
|
|
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false"
|
|
|
|
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" :class="$style.urlPreview"/>
|
|
|
|
:class="$style.urlPreview"/>
|
|
|
|
<div v-if="appearNote.renote" :class="$style.quote"><MkNoteSimple :note="appearNote.renote" :class="$style.quoteNote"/></div>
|
|
|
|
<div v-if="appearNote.renote" :class="$style.quote">
|
|
|
|
|
|
|
|
<MkNoteSimple :note="appearNote.renote" :class="$style.quoteNote"/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button v-if="isLong && collapsed" :class="$style.collapsed" class="_button" @click="collapsed = false">
|
|
|
|
<button v-if="isLong && collapsed" :class="$style.collapsed" class="_button" @click="collapsed = false">
|
|
|
|
<span :class="$style.collapsedLabel">{{ i18n.ts.showMore }}</span>
|
|
|
|
<span :class="$style.collapsedLabel">{{ i18n.ts.showMore }}</span>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
@ -98,9 +90,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
<span :class="$style.showLessLabel">{{ i18n.ts.showLess }}</span>
|
|
|
|
<span :class="$style.showLessLabel">{{ i18n.ts.showLess }}</span>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<MkA v-if="appearNote.channel && !inChannel" :class="$style.channel"
|
|
|
|
<MkA v-if="appearNote.channel && !inChannel" :class="$style.channel" :to="`/channels/${appearNote.channel.id}`"><i class="ti ti-device-tv"></i> {{ appearNote.channel.name }}</MkA>
|
|
|
|
:to="`/channels/${appearNote.channel.id}`"><i class="ti ti-device-tv"></i> {{ appearNote.channel.name }}
|
|
|
|
|
|
|
|
</MkA>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<MkReactionsViewer :note="appearNote" :maxNumber="16">
|
|
|
|
<MkReactionsViewer :note="appearNote" :maxNumber="16">
|
|
|
|
<template #more>
|
|
|
|
<template #more>
|
|
|
@ -125,17 +115,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
<button v-else :class="$style.footerButton" class="_button" disabled>
|
|
|
|
<button v-else :class="$style.footerButton" class="_button" disabled>
|
|
|
|
<i class="ti ti-ban"></i>
|
|
|
|
<i class="ti ti-ban"></i>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<button v-if="appearNote.myReaction == null" ref="reactButton" :class="$style.footerButton" class="_button"
|
|
|
|
<button v-if="appearNote.myReaction == null" ref="reactButton" :class="$style.footerButton" class="_button" @mousedown="react()">
|
|
|
|
@mousedown="react()">
|
|
|
|
|
|
|
|
<i v-if="appearNote.reactionAcceptance === 'likeOnly'" class="ti ti-heart"></i>
|
|
|
|
<i v-if="appearNote.reactionAcceptance === 'likeOnly'" class="ti ti-heart"></i>
|
|
|
|
<i v-else class="ti ti-plus"></i>
|
|
|
|
<i v-else class="ti ti-plus"></i>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<button v-if="appearNote.myReaction != null" ref="reactButton" :class="$style.footerButton" class="_button"
|
|
|
|
<button v-if="appearNote.myReaction != null" ref="reactButton" :class="$style.footerButton" class="_button" @click="undoReact(appearNote)">
|
|
|
|
@click="undoReact(appearNote)">
|
|
|
|
|
|
|
|
<i class="ti ti-minus"></i>
|
|
|
|
<i class="ti ti-minus"></i>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<button v-if="defaultStore.state.showClipButtonInNoteFooter" ref="clipButton" :class="$style.footerButton"
|
|
|
|
<button v-if="defaultStore.state.showClipButtonInNoteFooter" ref="clipButton" :class="$style.footerButton" class="_button" @mousedown="clip()">
|
|
|
|
class="_button" @mousedown="clip()">
|
|
|
|
|
|
|
|
<i class="ti ti-paperclip"></i>
|
|
|
|
<i class="ti ti-paperclip"></i>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<button ref="menuButton" :class="$style.footerButton" class="_button" @mousedown="menu()">
|
|
|
|
<button ref="menuButton" :class="$style.footerButton" class="_button" @mousedown="menu()">
|
|
|
@ -144,8 +131,16 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
</footer>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else />
|
|
|
|
<div v-else-if="muted && !hideMutedNotes" :class="$style.muted" @click="muted = false">
|
|
|
|
|
|
|
|
<I18n :src="i18n.ts.userSaysSomething" tag="small">
|
|
|
|
|
|
|
|
<template #name>
|
|
|
|
|
|
|
|
<MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)">
|
|
|
|
|
|
|
|
<MkUserName :user="appearNote.user"/>
|
|
|
|
|
|
|
|
</MkA>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</I18n>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
@ -228,6 +223,7 @@ const translation = ref<any>(null);
|
|
|
|
const translating = ref(false);
|
|
|
|
const translating = ref(false);
|
|
|
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
|
|
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
|
|
|
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || (appearNote.visibility === 'followers' && appearNote.userId === $i.id));
|
|
|
|
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || (appearNote.visibility === 'followers' && appearNote.userId === $i.id));
|
|
|
|
|
|
|
|
const hideMutedNotes = defaultStore.state.hideMutedNotes;
|
|
|
|
let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId || $i.id === appearNote.userId)) || (appearNote.myReaction != null)));
|
|
|
|
let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId || $i.id === appearNote.userId)) || (appearNote.myReaction != null)));
|
|
|
|
|
|
|
|
|
|
|
|
const keymap = {
|
|
|
|
const keymap = {
|
|
|
|