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)
This commit is contained in:
15
admin/src/state/useRemount.ts
Normal file
15
admin/src/state/useRemount.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// Lets a view ask App to remount the current route's component in place:
|
||||
// App keys the routed view by path plus this revision, so bumping it gives
|
||||
// the view a fresh instance without a navigation (Create and new on a
|
||||
// create form opens a blank form at the same path).
|
||||
import { readonly, ref } from 'vue'
|
||||
|
||||
const revision = ref(0)
|
||||
|
||||
/** Part of App's routed view key; bumped by remountView. */
|
||||
export const remountRevision = readonly(revision)
|
||||
|
||||
/** Remounts the current route's view. */
|
||||
export function remountView(): void {
|
||||
revision.value++
|
||||
}
|
||||
Reference in New Issue
Block a user