forked from FoundKeyGang/FoundKey
Preview existing replies in tooltip when hovering reply button
This commit is contained in:
parent
427e36e7ec
commit
7e635d23d3
1 changed files with 14 additions and 1 deletions
|
@ -70,7 +70,7 @@
|
|||
</div>
|
||||
<footer class="footer">
|
||||
<XReactionsViewer ref="reactionsViewer" :note="appearNote"/>
|
||||
<button class="button _button" @click="reply()">
|
||||
<button ref="replyButton" class="button _button" @click="reply()">
|
||||
<template v-if="appearNote.reply"><i class="fas fa-reply-all"></i></template>
|
||||
<template v-else><i class="fas fa-reply"></i></template>
|
||||
<p v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</p>
|
||||
|
@ -160,6 +160,7 @@ const isRenote = (
|
|||
|
||||
const el = ref<HTMLElement>();
|
||||
const menuButton = ref<HTMLElement>();
|
||||
const replyButton = ref<HTMLElement>();
|
||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||
const renoteTime = ref<HTMLElement>();
|
||||
const reactButton = ref<HTMLElement>();
|
||||
|
@ -208,6 +209,18 @@ useTooltip(parentReply, async (showing) => {
|
|||
}, {}, 'closed');
|
||||
});
|
||||
|
||||
useTooltip(replyButton, async (showing) => {
|
||||
const replies = await os.api('notes/replies', {
|
||||
noteId: appearNote.id,
|
||||
});
|
||||
|
||||
os.popup(NoteTooltip, {
|
||||
showing,
|
||||
notes: replies,
|
||||
targetElement: replyButton.value,
|
||||
}, {}, 'closed');
|
||||
});
|
||||
|
||||
function reply(viaKeyboard = false): void {
|
||||
pleaseLogin();
|
||||
os.post({
|
||||
|
|
Loading…
Reference in a new issue