mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-03 01:09:01 +09:00
tweak 907d519d
This commit is contained in:
parent
2ec464653d
commit
acafc98593
@ -11,6 +11,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
v-hotkey="keymap"
|
||||
:class="$style.root"
|
||||
>
|
||||
<div v-if="appearNote.reply && appearNote.reply.replyId && !conversationLoaded" style="padding: 16px">
|
||||
<MkButton style="margin: 0 auto;" primary rounded @click="loadConversation">{{ i18n.ts.loadConversation }}</MkButton>
|
||||
</div>
|
||||
<div v-if="isRenote" :class="$style.renote">
|
||||
<MkAvatar v-if="!defaultStore.state.hideAvatarsInNote" :class="$style.renoteAvatar" :user="note.user" link preview/>
|
||||
<MkA v-user-preview="note.userId" :class="$style.renoteName" :to="userPage(note.user)"/>
|
||||
@ -44,12 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="appearNote.reply && appearNote.reply.replyId">
|
||||
<div v-if="!conversationLoaded" style="padding: 16px">
|
||||
<MkButton style="margin: 0 auto;" primary rounded @click="loadConversation">{{ i18n.ts.loadConversation }}</MkButton>
|
||||
</div>
|
||||
<MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/>
|
||||
</div>
|
||||
<MkNoteSub v-for="note in conversation" v-if="appearNote.reply && appearNote.reply.replyId" :key="note.id" :class="$style.replyToMore" :note="note"/>
|
||||
<MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/>
|
||||
<article :class="$style.note" @contextmenu.stop="onContextmenu">
|
||||
<header :class="$style.noteHeader">
|
||||
@ -175,10 +173,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="tab === 'replies'" :class="$style.tab_replies">
|
||||
<div v-if="!repliesLoaded" style="padding: 16px">
|
||||
<div v-if="replies.length > 3 && !repliesLoaded" style="padding: 16px">
|
||||
<MkButton style="margin: 0 auto;" primary rounded @click="loadReplies">{{ i18n.ts.loadReplies }}</MkButton>
|
||||
</div>
|
||||
<MkNoteSub v-for="note in replies" :key="note.id" :note="note" :class="$style.reply" :detail="true"/>
|
||||
<MkNoteSub v-for="note in replies" v-if="replies.length <= 3 || repliesLoaded" :key="note.id" :note="note" :class="$style.reply" :detail="true"/>
|
||||
</div>
|
||||
<div v-else-if="tab === 'renotes'" :class="$style.tab_renotes">
|
||||
<MkPagination :pagination="renotesPagination">
|
||||
@ -581,6 +579,13 @@ function blur() {
|
||||
el.value.blur();
|
||||
}
|
||||
|
||||
os.api('notes/children', {
|
||||
noteId: appearNote.id,
|
||||
limit: 4,
|
||||
}).then(res => {
|
||||
replies.value = res;
|
||||
});
|
||||
|
||||
const repliesLoaded = ref(false);
|
||||
function loadReplies() {
|
||||
repliesLoaded.value = true;
|
||||
|
@ -251,6 +251,18 @@ export function getNoteMenu(props: {
|
||||
os.pageWindow(`/notes/${appearNote.id}`);
|
||||
}
|
||||
|
||||
function showReactions(): void {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkReactedUsersDialog.vue')), {
|
||||
noteId: appearNote.id,
|
||||
}, {}, 'closed');
|
||||
}
|
||||
|
||||
function showRenotes(): void {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkRenotedUsersDialog.vue')), {
|
||||
noteId: appearNote.id,
|
||||
}, {}, 'closed');
|
||||
}
|
||||
|
||||
async function translate(): Promise<void> {
|
||||
if (props.translation.value != null) return;
|
||||
props.translating.value = true;
|
||||
@ -277,6 +289,14 @@ export function getNoteMenu(props: {
|
||||
action: unclip,
|
||||
}, null] : []
|
||||
), {
|
||||
icon: 'ti ti-repeat',
|
||||
text: i18n.ts.renotesList,
|
||||
action: showRenotes,
|
||||
}, {
|
||||
icon: 'ti ti-icons',
|
||||
text: i18n.ts.reactionsList,
|
||||
action: showReactions,
|
||||
}, {
|
||||
icon: 'ti ti-info-circle',
|
||||
text: i18n.ts.details,
|
||||
action: openDetail,
|
||||
|
Loading…
Reference in New Issue
Block a user