From 19ca2872a58540ec0912cf9227e7a58ded7b6528 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 1 Nov 2023 15:58:40 +0900 Subject: [PATCH] fix --- .../frontend/src/components/MkPostFormAttaches.vue | 10 +++++----- .../src/components/MkReactionsViewer.reaction.vue | 6 +++--- packages/frontend/src/components/MkReactionsViewer.vue | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/frontend/src/components/MkPostFormAttaches.vue b/packages/frontend/src/components/MkPostFormAttaches.vue index 6931b093de..28a09c571f 100644 --- a/packages/frontend/src/components/MkPostFormAttaches.vue +++ b/packages/frontend/src/components/MkPostFormAttaches.vue @@ -46,7 +46,7 @@ const emit = defineEmits<{ let menuShowing = false; function detachMedia(id: string) { - if (props.mock) return; + if (mock) return; if (props.detachMediaFn) { props.detachMediaFn(id); @@ -56,7 +56,7 @@ function detachMedia(id: string) { } function toggleSensitive(file) { - if (props.mock) { + if (mock) { emit('changeSensitive', file, !file.isSensitive); return; } @@ -70,7 +70,7 @@ function toggleSensitive(file) { } async function rename(file) { - if (props.mock) return; + if (mock) return; const { canceled, result } = await os.inputText({ title: i18n.ts.enterFileName, @@ -88,7 +88,7 @@ async function rename(file) { } async function describe(file) { - if (props.mock) return; + if (mock) return; os.popup(defineAsyncComponent(() => import('@/components/MkFileCaptionEditWindow.vue')), { default: file.comment !== null ? file.comment : '', @@ -107,7 +107,7 @@ async function describe(file) { } async function crop(file: Misskey.entities.DriveFile): Promise { - if (props.mock) return; + if (mock) return; const newFile = await os.cropImage(file, { aspectRatio: NaN }); emit('replaceFile', file, newFile); diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index a560308e12..d532ef9b66 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -59,7 +59,7 @@ async function toggleReaction() { }); if (confirm.canceled) return; - if (props.mock) { + if (mock) { emit('reactionToggled', props.reaction, (props.count - 1)); return; } @@ -75,7 +75,7 @@ async function toggleReaction() { } }); } else { - if (props.mock) { + if (mock) { emit('reactionToggled', props.reaction, (props.count + 1)); return; } @@ -108,7 +108,7 @@ onMounted(() => { if (!props.isInitial) anime(); }); -if (!props.mock) { +if (!mock) { useTooltip(buttonEl, async (showing) => { const reactions = await os.apiGet('notes/reactions', { noteId: props.note.id, diff --git a/packages/frontend/src/components/MkReactionsViewer.vue b/packages/frontend/src/components/MkReactionsViewer.vue index dcea6a82c2..eaa7faa4f9 100644 --- a/packages/frontend/src/components/MkReactionsViewer.vue +++ b/packages/frontend/src/components/MkReactionsViewer.vue @@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only