From 0504427f802f80e73b587cb81364c3a5eba93d25 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 1 Dec 2022 17:31:59 +0800 Subject: [PATCH 1/2] feat(nc-gui): add $e for shortcuts --- packages/nc-gui/components/dashboard/TreeView.vue | 1 + packages/nc-gui/components/general/FullScreen.vue | 5 ++++- packages/nc-gui/components/general/ShareBaseButton.vue | 5 ++++- packages/nc-gui/components/smartsheet/Grid.vue | 9 +++++++++ .../nc-gui/pages/[projectType]/[projectId]/index.vue | 2 ++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index bf05399189..6a4c1f3e76 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -241,6 +241,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => { if (isCreateTableAllowed.value && !isDrawerOrModalExist()) { // prevent the key `T` is inputted to table title input e.preventDefault() + $e('a:shortcut', { key: 'ALT + T' }) openTableCreateDialog() } break diff --git a/packages/nc-gui/components/general/FullScreen.vue b/packages/nc-gui/components/general/FullScreen.vue index 6c3fe32bd6..0562df692b 100644 --- a/packages/nc-gui/components/general/FullScreen.vue +++ b/packages/nc-gui/components/general/FullScreen.vue @@ -1,10 +1,12 @@