|
|
|
@@ -77,7 +77,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
v-if="appearNote.text"
|
|
|
|
|
:parsedNodes="parsed"
|
|
|
|
|
:text="appearNote.text"
|
|
|
|
|
:author="appearNote.user"
|
|
|
|
|
:nyaize="'respect'"
|
|
|
|
|
:emojiUrls="appearNote.emojis"
|
|
|
|
|
:enableEmojiMenu="true"
|
|
|
|
@@ -88,7 +87,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
<MkLoading v-if="translating" mini/>
|
|
|
|
|
<div v-else-if="translation">
|
|
|
|
|
<b>{{ i18n.tsx.translatedFrom({ x: translation.sourceLang }) }}: </b>
|
|
|
|
|
<Mfm :text="translation.text" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
|
|
|
|
|
<Mfm :text="translation.text" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="appearNote.files && appearNote.files.length > 0">
|
|
|
|
@@ -143,12 +142,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
</footer>
|
|
|
|
|
</article>
|
|
|
|
|
<div :class="$style.tabs">
|
|
|
|
|
|
|
|
|
|
<button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'replies' },{[$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light' && tab === 'replies'}]" @click="tab = 'replies'"><i class="ti ti-arrow-back-up"></i> {{ i18n.ts.replies }}</button>
|
|
|
|
|
<button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'renotes'},{[$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light' && tab === 'renotes'}]" @click="tab = 'renotes'"><i class="ti ti-repeat"></i> {{ i18n.ts.renotes }}</button>
|
|
|
|
|
<button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'reactions'},{[$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light' && tab === 'reactions'}]" @click="tab = 'reactions'"><i class="ti ti-icons"></i> {{ i18n.ts.reactions }}</button>
|
|
|
|
|
<button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'history' },{[$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light']" @click="tab = 'history'"><i class="ti ti-pencil"></i> {{ i18n.ts.edited }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
<button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'history' },{[$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light'}]" @click="tab = 'history'"><i class="ti ti-pencil"></i> {{ i18n.ts.edited }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div v-if="tab === 'replies'">
|
|
|
|
|
<div v-if="!repliesLoaded" style="padding: 16px">
|
|
|
|
@@ -186,26 +184,39 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="tab === 'history'" :class="$style.tab_history">
|
|
|
|
|
<div style="display: grid;">
|
|
|
|
|
<div v-for="text in appearNote.noteEditHistory.reverse()" :key="text">
|
|
|
|
|
<MkNotePreview :class="$style.historyNote" :text="text"/>
|
|
|
|
|
<div v-for="(text, index) in appearNote.noteEditHistory" :key="text" :class="$style.historyRoot">
|
|
|
|
|
<MkAvatar :class="$style.avatar" :user="appearNote.user" link preview/>
|
|
|
|
|
<div :class="$style.historyMain">
|
|
|
|
|
<div :class="$style.historyHeader">
|
|
|
|
|
<MkUserName :user="appearNote.user" :nowrap="true"/>
|
|
|
|
|
<MkTime :class="$style.updatedAt" :time="appearNote.updatedAtHistory![index]"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<Mfm :text="text.trim()" :author="appearNote.user" :i="$i"/>
|
|
|
|
|
</div>
|
|
|
|
|
<CodeDiff
|
|
|
|
|
:oldString="appearNote.noteEditHistory[index - 1] || ''"
|
|
|
|
|
:newString="text"
|
|
|
|
|
:trim="true"
|
|
|
|
|
:hideHeader="true"
|
|
|
|
|
diffStyle="char"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="appearNote.noteEditHistory == null" class="_fullinfo">
|
|
|
|
|
<img :src="infoImageUrl" class="_ghost"/>
|
|
|
|
|
<div>{{ i18n.ts.nothing }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="_panel" :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>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import {computed, inject, onMounted, provide, ref, shallowRef, watch} from 'vue';
|
|
|
|
|
import { computed, inject, onMounted, provide, ref, shallowRef, watch } from 'vue';
|
|
|
|
|
import * as mfm from 'mfm-js';
|
|
|
|
|
import * as Misskey from 'misskey-js';
|
|
|
|
|
import MkNoteSub from '@/components/MkNoteSub.vue';
|
|
|
|
@@ -241,6 +252,13 @@ import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
|
|
|
|
import MkPagination, { type Paging } from '@/components/MkPagination.vue';
|
|
|
|
|
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
|
|
|
|
import MkButton from '@/components/MkButton.vue';
|
|
|
|
|
import { miLocalStorage } from '@/local-storage.js';
|
|
|
|
|
import { infoImageUrl, instance } from '@/instance.js';
|
|
|
|
|
import MkPostForm from '@/components/MkPostFormSimple.vue';
|
|
|
|
|
import { deviceKind } from '@/scripts/device-kind.js';
|
|
|
|
|
|
|
|
|
|
const MOBILE_THRESHOLD = 500;
|
|
|
|
|
const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD);
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
note: Misskey.entities.Note;
|
|
|
|
@@ -250,38 +268,37 @@ const inChannel = inject('inChannel', null);
|
|
|
|
|
|
|
|
|
|
const note = ref(deepClone(props.note));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let gaming = ref('');
|
|
|
|
|
|
|
|
|
|
const gamingMode = computed(defaultStore.makeGetterSetter('gamingMode'));
|
|
|
|
|
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
|
|
|
|
|
if (darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'dark';
|
|
|
|
|
gaming.value = 'dark';
|
|
|
|
|
} else if (!darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'light';
|
|
|
|
|
gaming.value = 'light';
|
|
|
|
|
} else {
|
|
|
|
|
gaming.value = '';
|
|
|
|
|
gaming.value = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
watch(darkMode, () => {
|
|
|
|
|
if (darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'dark';
|
|
|
|
|
} else if (!darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'light';
|
|
|
|
|
} else {
|
|
|
|
|
gaming.value = '';
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'dark';
|
|
|
|
|
} else if (!darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'light';
|
|
|
|
|
} else {
|
|
|
|
|
gaming.value = '';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
watch(gamingMode, () => {
|
|
|
|
|
if (darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'dark';
|
|
|
|
|
} else if (!darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'light';
|
|
|
|
|
} else {
|
|
|
|
|
gaming.value = '';
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'dark';
|
|
|
|
|
} else if (!darkMode.value && gamingMode.value == true) {
|
|
|
|
|
gaming.value = 'light';
|
|
|
|
|
} else {
|
|
|
|
|
gaming.value = '';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// plugin
|
|
|
|
|
if (noteViewInterruptors.length > 0) {
|
|
|
|
|
onMounted(async () => {
|
|
|
|
@@ -831,12 +848,32 @@ function loadConversation() {
|
|
|
|
|
width: 50px;
|
|
|
|
|
height: 50px;
|
|
|
|
|
}
|
|
|
|
|
.noteFooterButton {
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.historyRoot {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
overflow: clip;
|
|
|
|
|
font-size: 0.95em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.noteFooterButton {
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.historyMain {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.historyHeader {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-bottom: 2px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: clip;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.historyNote {
|
|
|
|
@@ -845,6 +882,12 @@ function loadConversation() {
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.updatedAt {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.muted {
|
|
|
|
|
padding: 8px;
|
|
|
|
|
text-align: center;
|
|
|
|
|