1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-01 15:05:32 +02:00
This commit is contained in:
syuilo
2025-08-26 17:31:36 +09:00
parent 203296b9cb
commit 69bbac013a
13 changed files with 67 additions and 39 deletions

View File

@@ -39,10 +39,12 @@ const el = ref<HTMLElement | { $el: HTMLElement }>();
if (isEnabledUrlPreview.value) {
useTooltip(el, (showing) => {
const anchorElement = el.value instanceof HTMLElement ? el.value : el.value?.$el;
if (anchorElement == null) return;
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
showing,
url: props.url,
anchorElement: el.value instanceof HTMLElement ? el.value : el.value?.$el,
anchorElement: anchorElement,
}, {
closed: () => dispose(),
});

View File

@@ -654,7 +654,7 @@ function showRenoteMenu(): void {
getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote),
{ type: 'divider' },
getAbuseNoteMenu(note, i18n.ts.reportAbuseRenote),
($i?.isModerator || $i?.isAdmin) ? getUnrenote() : undefined,
...(($i?.isModerator || $i?.isAdmin) ? [getUnrenote()] : []),
], renoteTime.value);
}
}

View File

@@ -392,6 +392,9 @@ const reactionsPaginator = markRaw(new Paginator('notes/reactions', {
}));
useTooltip(renoteButton, async (showing) => {
const anchorElement = renoteButton.value;
if (anchorElement == null) return;
const renotes = await misskeyApi('notes/renotes', {
noteId: appearNote.id,
limit: 11,
@@ -405,7 +408,7 @@ useTooltip(renoteButton, async (showing) => {
showing,
users,
count: appearNote.renoteCount,
anchorElement: renoteButton.value,
anchorElement: anchorElement,
}, {
closed: () => dispose(),
});

View File

@@ -57,7 +57,7 @@ async function _close() {
modal.value?.close();
}
function onEsc(ev: KeyboardEvent) {
function onEsc() {
_close();
}