mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-01 15:05:32 +02:00
refactor
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
});
|
||||
|
||||
@@ -57,7 +57,7 @@ async function _close() {
|
||||
modal.value?.close();
|
||||
}
|
||||
|
||||
function onEsc(ev: KeyboardEvent) {
|
||||
function onEsc() {
|
||||
_close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user