Unfucked note view
This commit is contained in:
parent
a2954851e0
commit
265f96221f
|
@ -11,12 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
v-hotkey="keymap"
|
v-hotkey="keymap"
|
||||||
:class="$style.root"
|
:class="$style.root"
|
||||||
>
|
>
|
||||||
<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"/>
|
<MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/>
|
||||||
</div>
|
|
||||||
<MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/>
|
<MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/>
|
||||||
<div v-if="isRenote" :class="$style.renote">
|
<div v-if="isRenote" :class="$style.renote">
|
||||||
<MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/>
|
<MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/>
|
||||||
|
@ -137,9 +132,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="tab === 'replies'" :class="$style.tab_replies">
|
<div v-if="tab === 'replies'" :class="$style.tab_replies">
|
||||||
<div v-if="!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" :key="note.id" :note="note" :class="$style.reply" :detail="true"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="tab === 'renotes'" :class="$style.tab_renotes">
|
<div v-else-if="tab === 'renotes'" :class="$style.tab_renotes">
|
||||||
|
@ -495,20 +487,14 @@ function blur() {
|
||||||
el.value.blur();
|
el.value.blur();
|
||||||
}
|
}
|
||||||
|
|
||||||
const repliesLoaded = ref(false);
|
|
||||||
function loadReplies() {
|
|
||||||
repliesLoaded.value = true;
|
|
||||||
os.api('notes/children', {
|
os.api('notes/children', {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
replies.value = res;
|
replies.value = res;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
const conversationLoaded = ref(false);
|
if (appearNote.replyId) {
|
||||||
function loadConversation() {
|
|
||||||
conversationLoaded.value = true;
|
|
||||||
os.api('notes/conversation', {
|
os.api('notes/conversation', {
|
||||||
noteId: appearNote.replyId,
|
noteId: appearNote.replyId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
Loading…
Reference in New Issue