M3.9: hamburger app menu
A slim header bar in MainLayout with a menu button (Lucide menu) whose dropdown lists every command with a menuPath, grouped File, Edit, View, Go, Help, with shortcuts and dimmed disabled entries. Keyboard: arrows, Home/End, Enter/Space, Escape/Tab, type-ahead. menu.open (Alt+M) opens it, also over uiCommand. It is an exclusive modal and a launcher under the one-modal rule. Menu paths for the user-facing engine and UI commands (buffer.close as File/Close Tab). Catalog strings, Vitest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
78709dd76b
commit
27ad30369c
14 changed files with 1004 additions and 25 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* The modal rule (M1.15): at most one modal is open at a time.
|
||||
*
|
||||
* - **Exclusive modals:** the command palette, the go-to popup (M2.6), the
|
||||
* settings dialog and the close question of a dirty tab. Opening one closes the one that is open
|
||||
* app menu (M3.9), the settings dialog and the close question of a dirty tab. Opening one closes the one that is open
|
||||
* (the close question closes as Cancel). Each reports itself with
|
||||
* {@link useModalsStore}'s `opened` and `closed`; the close question is
|
||||
* followed from the editor store, so the editor needs no code for it.
|
||||
|
|
@ -15,14 +15,15 @@
|
|||
* `palette.open` closes it first (see `store.ts` › `execute`), so a
|
||||
* `uiCommand` from the control channel never leaves it open behind
|
||||
* what the command shows. The go-to popup is a launcher too: any command
|
||||
* but the go-to open commands closes it.
|
||||
* but the go-to open commands closes it. So is the app menu (M3.9): any
|
||||
* command but `menu.open` closes it.
|
||||
*/
|
||||
import { defineStore } from "pinia";
|
||||
import { ref, watch } from "vue";
|
||||
import { useEditorStore } from "../stores/editor";
|
||||
|
||||
/** The exclusive modals. */
|
||||
export type ModalId = "palette" | "goto" | "settings" | "closePrompt";
|
||||
export type ModalId = "palette" | "goto" | "menu" | "settings" | "closePrompt";
|
||||
|
||||
/** Store of the open exclusive modal. */
|
||||
export const useModalsStore = defineStore("modals", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue