diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2023-03-31 15:54:18 +0900 |
|---|---|---|
| committer | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2023-03-31 15:54:18 +0900 |
| commit | bf9846a2699b65677765325b1add15020aadd45f (patch) | |
| tree | e40a04b788e41e16f27bd389e8e94e8e29a96c81 /packages/frontend/src/components/MkNote.vue | |
| parent | build(#10336): write stories for `MkAd` (diff) | |
| parent | feat: チャンネルにノートをピン留めできるように (diff) | |
| download | misskey-bf9846a2699b65677765325b1add15020aadd45f.tar.gz misskey-bf9846a2699b65677765325b1add15020aadd45f.tar.bz2 misskey-bf9846a2699b65677765325b1add15020aadd45f.zip | |
Merge branch 'develop' of https://github.com/misskey-dev/misskey into storybook
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNote.vue | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 72c6e55df1..eb9793fcc1 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -169,6 +169,7 @@ const props = defineProps<{ }>(); const inChannel = inject('inChannel', null); +const currentClip = inject<Ref<misskey.entities.Clip> | null>('currentClip', null); let note = $ref(deepClone(props.note)); @@ -370,8 +371,6 @@ function undoReact(note): void { }); } -const currentClipPage = inject<Ref<misskey.entities.Clip> | null>('currentClipPage', null); - function onContextmenu(ev: MouseEvent): void { const isLink = (el: HTMLElement) => { if (el.tagName === 'A') return true; @@ -386,18 +385,18 @@ function onContextmenu(ev: MouseEvent): void { ev.preventDefault(); react(); } else { - os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClipPage }), ev).then(focus); + os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClip: currentClip?.value }), ev).then(focus); } } function menu(viaKeyboard = false): void { - os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClipPage }), menuButton.value, { + os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClip: currentClip?.value }), menuButton.value, { viaKeyboard, }).then(focus); } async function clip() { - os.popupMenu(await getNoteClipMenu({ note: note, isDeleted, currentClipPage }), clipButton.value).then(focus); + os.popupMenu(await getNoteClipMenu({ note: note, isDeleted, currentClip: currentClip?.value }), clipButton.value).then(focus); } function showRenoteMenu(viaKeyboard = false): void { |