M1.8: command palette, global keymap, UI commands
- Engine: ui.registerCommands (validated, replaces the previous set),
UI commands in listCommands with ui: true and labelKey, running one
through the engine emits uiCommand {id, params}.
- Frontend: ui/src/commands/ (keymap by key code, fuzzy ranking, Pinia
commands store with handlers, recents and error toasts), the command
palette (Mod+Shift+P), UI commands palette.open, settings.open (Mod+,,
disabled until M1.9b) and view.toggleProjectTree (Mod+1). The editor's
shortcuts.ts moved into the global keymap.
- Tests: engine and control-channel tests for registration and
uiCommand, Vitest for keymap, ranking, store, palette and App wiring.
- Docs: architecture, ui-parity, target-app-parity, gaps, roadmap,
ROADMAP, README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2f8fef876b
commit
184b8a3468
33 changed files with 2282 additions and 233 deletions
|
|
@ -2,12 +2,15 @@
|
|||
/**
|
||||
* Root component: mounts the main window layout with the editor area; the
|
||||
* slogan shows while no tab is open, and the restore dialog for unsaved
|
||||
* texts from the recovery journal, and the toast stack. Loads product
|
||||
* information from the engine on mount, starts showing notifications and
|
||||
* following the theme (see `theme.ts`); a failed theme report raises an
|
||||
* error toast.
|
||||
* texts from the recovery journal, the toast stack and the command
|
||||
* palette. Loads product information from the engine on mount, starts
|
||||
* showing notifications, following the theme (see `theme.ts`; a failed
|
||||
* theme report raises an error toast) and the global keymap with the UI
|
||||
* commands (see `commands/store.ts`).
|
||||
*/
|
||||
import { onMounted, onUnmounted } from "vue";
|
||||
import { useCommandsStore } from "./commands/store";
|
||||
import CommandPalette from "./components/palette/CommandPalette.vue";
|
||||
import EditorArea from "./components/editor/EditorArea.vue";
|
||||
import MainLayout from "./components/layout/MainLayout.vue";
|
||||
import NotificationStack from "./components/notifications/NotificationStack.vue";
|
||||
|
|
@ -18,6 +21,7 @@ import { startTheme } from "./theme";
|
|||
|
||||
const app = useAppStore();
|
||||
const notifications = useNotificationsStore();
|
||||
const commands = useCommandsStore();
|
||||
|
||||
/** Stops following the theme; set while mounted. */
|
||||
let stopTheme: (() => void) | null = null;
|
||||
|
|
@ -25,12 +29,14 @@ let stopTheme: (() => void) | null = null;
|
|||
onMounted(() => {
|
||||
notifications.start();
|
||||
stopTheme = startTheme((error) => notifications.notifyError("theme.systemPreference", error));
|
||||
void commands.start();
|
||||
void app.loadAbout();
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
stopTheme?.();
|
||||
stopTheme = null;
|
||||
commands.stop();
|
||||
notifications.stop();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -44,6 +50,7 @@ onUnmounted(() => {
|
|||
</EditorArea>
|
||||
</MainLayout>
|
||||
<RecoveryDialog />
|
||||
<CommandPalette />
|
||||
<NotificationStack />
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue