From 8f2f62c4663e8110b64175478b1c53e41a0fe8fd Mon Sep 17 00:00:00 2001 From: Hikaru Y Date: Sun, 27 Nov 2022 09:29:58 +0900 Subject: [PATCH] Fix shortcuts for tag actions not working (#2214) --- ts/lib/context-keys.ts | 1 + ts/tag-editor/TagEditor.svelte | 19 +++++++++++++++++- ts/tag-editor/TagInput.svelte | 8 ++++++-- .../TagsSelectedButton.svelte | 20 +++++-------------- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/ts/lib/context-keys.ts b/ts/lib/context-keys.ts index 417443812..bcea0b1a4 100644 --- a/ts/lib/context-keys.ts +++ b/ts/lib/context-keys.ts @@ -6,3 +6,4 @@ export const fontSizeKey = Symbol("fontSize"); export const directionKey = Symbol("direction"); export const descriptionKey = Symbol("description"); export const collapsedKey = Symbol("collapsed"); +export const tagActionsShortcutsKey = Symbol("tagActionsShortcuts"); diff --git a/ts/tag-editor/TagEditor.svelte b/ts/tag-editor/TagEditor.svelte index 8b101b8c5..29bb87de7 100644 --- a/ts/tag-editor/TagEditor.svelte +++ b/ts/tag-editor/TagEditor.svelte @@ -3,11 +3,13 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> +{#if anyTagsSelected} + + + +{/if} +
diff --git a/ts/tag-editor/tag-options-button/TagsSelectedButton.svelte b/ts/tag-editor/tag-options-button/TagsSelectedButton.svelte index 195989ac5..83676d15c 100644 --- a/ts/tag-editor/tag-options-button/TagsSelectedButton.svelte +++ b/ts/tag-editor/tag-options-button/TagsSelectedButton.svelte @@ -3,13 +3,13 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> dispatch("tagselectall")}> - {tr.editingTagsSelectAll()} ({getPlatformString(allShortcut)}) + {tr.editingTagsSelectAll()} ({getPlatformString(selectAllShortcut)}) - dispatch("tagselectall")} - /> dispatch("tagcopy")} >{tr.editingTagsCopy()} ({getPlatformString(copyShortcut)}) - dispatch("tagcopy")} /> dispatch("tagdelete")} >{tr.editingTagsRemove()} ({getPlatformString( removeShortcut, )}) - dispatch("tagdelete")} - />