From 802a35d4b6f438f9f931eb5cd791e950deaa445b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Jun 2022 18:27:47 +0900 Subject: [PATCH] fix typo --- packages/client/src/components/note.vue | 6 +++--- packages/client/src/pages/clip.vue | 2 +- packages/client/src/scripts/get-note-menu.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue index b06f4edd0..9ec1e53c1 100644 --- a/packages/client/src/components/note.vue +++ b/packages/client/src/components/note.vue @@ -225,7 +225,7 @@ function undoReact(note): void { }); } -const cullentClipPage = inject>('cullentClipPage'); +const currentClipPage = inject>('currentClipPage'); function onContextmenu(ev: MouseEvent): void { const isLink = (el: HTMLElement) => { @@ -241,12 +241,12 @@ function onContextmenu(ev: MouseEvent): void { ev.preventDefault(); react(); } else { - os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, cullentClipPage }), ev).then(focus); + os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClipPage }), ev).then(focus); } } function menu(viaKeyboard = false): void { - os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, cullentClipPage }), menuButton.value, { + os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClipPage }), menuButton.value, { viaKeyboard, }).then(focus); } diff --git a/packages/client/src/pages/clip.vue b/packages/client/src/pages/clip.vue index bfe1578b1..163384337 100644 --- a/packages/client/src/pages/clip.vue +++ b/packages/client/src/pages/clip.vue @@ -47,7 +47,7 @@ watch(() => props.clipId, async () => { immediate: true, }); -provide('cullentClipPage', $$(clip)); +provide('currentClipPage', $$(clip)); defineExpose({ [symbols.PAGE_INFO]: computed(() => clip ? { diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index e56d51949..283c90362 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -15,7 +15,7 @@ export function getNoteMenu(props: { translation: Ref; translating: Ref; isDeleted: Ref; - cullentClipPage?: Ref; + currentClipPage?: Ref; }) { const isRenote = ( props.note.renote != null && @@ -138,7 +138,7 @@ export function getNoteMenu(props: { }); if (!confirm.canceled) { os.apiWithDialog('clips/remove-note', { clipId: clip.id, noteId: appearNote.id }); - if (props.cullentClipPage?.value.id === clip.id) props.isDeleted.value = true; + if (props.currentClipPage?.value.id === clip.id) props.isDeleted.value = true; } } else { os.alert({ @@ -154,7 +154,7 @@ export function getNoteMenu(props: { } async function unclip(): Promise { - os.apiWithDialog('clips/remove-note', { clipId: props.cullentClipPage.value.id, noteId: appearNote.id }); + os.apiWithDialog('clips/remove-note', { clipId: props.currentClipPage.value.id, noteId: appearNote.id }); props.isDeleted.value = true; } @@ -198,7 +198,7 @@ export function getNoteMenu(props: { menu = [ ...( - props.cullentClipPage?.value.userId === $i.id ? [{ + props.currentClipPage?.value.userId === $i.id ? [{ icon: 'fas fa-circle-minus', text: i18n.ts.unclip, danger: true,