From c4d813718661a3ce5f6b775cd1592bd5b437d790 Mon Sep 17 00:00:00 2001 From: Hartmut <10864443+hartmut-co-uk@users.noreply.github.com> Date: Tue, 7 Mar 2023 20:32:21 +0100 Subject: [PATCH] feat: basic keyboard shortcuts (#319) --- .../magickeys/MagickeysKeyboardShortcuts.vue | 119 ++++++++++++++++++ components/modal/ModalContainer.vue | 4 + components/publish/PublishWidget.vue | 2 +- components/status/StatusCard.vue | 1 + components/status/StatusDetails.vue | 2 +- composables/dialog.ts | 9 ++ composables/magickeys.ts | 44 +++++++ locales/en.json | 28 +++++ .../{scroll-to-top.ts => 1.scroll-to-top.ts} | 0 plugins/magic-keys.client.ts | 59 +++++++++ styles/vars.css | 6 +- 11 files changed, 270 insertions(+), 4 deletions(-) create mode 100644 components/magickeys/MagickeysKeyboardShortcuts.vue create mode 100644 composables/magickeys.ts rename plugins/{scroll-to-top.ts => 1.scroll-to-top.ts} (100%) create mode 100644 plugins/magic-keys.client.ts diff --git a/components/magickeys/MagickeysKeyboardShortcuts.vue b/components/magickeys/MagickeysKeyboardShortcuts.vue new file mode 100644 index 00000000..1f28580a --- /dev/null +++ b/components/magickeys/MagickeysKeyboardShortcuts.vue @@ -0,0 +1,119 @@ + + + diff --git a/components/modal/ModalContainer.vue b/components/modal/ModalContainer.vue index 94bcfe92..6ad92622 100644 --- a/components/modal/ModalContainer.vue +++ b/components/modal/ModalContainer.vue @@ -7,6 +7,7 @@ import { isEditHistoryDialogOpen, isErrorDialogOpen, isFavouritedBoostedByDialogOpen, + isKeyboardShortcutsDialogOpen, isMediaPreviewOpen, isPreviewHelpOpen, isPublishDialogOpen, @@ -98,5 +99,8 @@ const handleFavouritedBoostedByClose = () => { > + + + diff --git a/components/publish/PublishWidget.vue b/components/publish/PublishWidget.vue index 9f8a13dd..2578912d 100644 --- a/components/publish/PublishWidget.vue +++ b/components/publish/PublishWidget.vue @@ -156,7 +156,7 @@ defineExpose({