From cf5460d2980fe23feb1efdd9f772403a626b32de Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 2 Mar 2022 22:05:16 +0100 Subject: [PATCH] fix: keyboard shortcut text indicating what works where --- src/components/misc/keyboard-shortcuts/index.vue | 11 ++++++++--- src/i18n/lang/en.json | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/misc/keyboard-shortcuts/index.vue b/src/components/misc/keyboard-shortcuts/index.vue index eb293029..274c5ff5 100644 --- a/src/components/misc/keyboard-shortcuts/index.vue +++ b/src/components/misc/keyboard-shortcuts/index.vue @@ -6,9 +6,13 @@ {{ - s.available($route) - ? $t('keyboardShortcuts.currentPageOnly') - : $t('keyboardShortcuts.allPages') + typeof s.available === 'undefined' ? + $t('keyboardShortcuts.allPages') : + ( + s.available($route) + ? $t('keyboardShortcuts.currentPageOnly') + : $t('keyboardShortcuts.somePagesOnly') + ) }} @@ -38,6 +42,7 @@ import {KEYBOARD_SHORTCUTS_ACTIVE} from '@/store/mutation-types' import {KEYBOARD_SHORTCUTS as shortcuts} from './shortcuts' const store = useStore() + function close() { store.commit(KEYBOARD_SHORTCUTS_ACTIVE, false) } diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index d832dfed..fbbdc5b7 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -785,6 +785,7 @@ "general": "General", "allPages": "These shortcuts work on all pages.", "currentPageOnly": "These shortcuts work only on the current page.", + "somePagesOnly": "These shortcuts work only on some pages.", "toggleMenu": "Toggle The Menu", "quickSearch": "Open the search/quick action bar", "then": "then",