From 49accf675ed00899e62c9b57d9977379438d9c40 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Thu, 22 Oct 2026 21:00:57 +0200 Subject: [PATCH] feat(quick-261022-k9k): admin save shortcuts and Create and new on record forms - app/hotkeys.ts: dependency-free data-hotkey core (Ctrl/Cmd+S, Ctrl/Cmd+Enter, Ctrl/Cmd+Shift+S, Esc, / and ?), innermost-modal root, capture-phase modifier listener, platform labels and the help-dialog state - Button hotkey prop (data-hotkey, aria-keyshortcuts); shortcuts installed by AppShell - FormView: save keys and tooltips, Create and new on create forms via remountView - phrasebook: form.create_and_new and the shortcuts group (en, pl) --- admin/src/App.vue | 7 +- admin/src/app/hotkeys.ts | 263 +++++++++++++++++++ admin/src/components/shell/AppShell.vue | 10 +- admin/src/components/ui/Button.vue | 25 +- admin/src/state/useRemount.ts | 15 ++ admin/src/views/FormView.vue | 47 +++- admin/tests/fixtures/lang.json | 21 ++ admin/tests/smoke/shortcuts.smoke.test.ts | 68 +++++ docs/backend/forms.md | 2 + modules/phrasebook/backend/lang/en/lang.yaml | 8 + modules/phrasebook/backend/lang/pl/lang.yaml | 8 + 11 files changed, 465 insertions(+), 9 deletions(-) create mode 100644 admin/src/app/hotkeys.ts create mode 100644 admin/src/state/useRemount.ts create mode 100644 admin/tests/smoke/shortcuts.smoke.test.ts diff --git a/admin/src/App.vue b/admin/src/App.vue index c22063ca..f8877ed7 100644 --- a/admin/src/App.vue +++ b/admin/src/App.vue @@ -3,6 +3,7 @@ import { computed, watchEffect } from 'vue' import { RouterView, useRoute } from 'vue-router' import { documentTitleForRoute } from './app/pageTitle' import AppShell from './components/shell/AppShell.vue' +import { remountRevision } from './state/useRemount' const route = useRoute() const inShell = computed(() => route.meta.shell === true) @@ -14,10 +15,12 @@ watchEffect(() => {