M1.9b: settings dialog with search
settings.open (Mod+,) opens a dialog built from settings.list: sections, controls by type (select, number with min/max, switch), catalog labels and descriptions, search over label, description, key and section, Reset to default, inline errors, live updates on settingsChanged. The theme picker switches at once; editor.fontSize drives --lt-font-size-editor through a token override that survives theme switches. Focus trap, Escape closes. Finishes M1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
db34e2ca52
commit
523d7f684f
17 changed files with 1751 additions and 36 deletions
|
|
@ -2,11 +2,12 @@
|
|||
/**
|
||||
* 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, 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`).
|
||||
* texts from the recovery journal, the toast stack, the command palette
|
||||
* and the settings dialog. 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`), and loads the settings so the
|
||||
* editor font size applies from the start (see `stores/settings.ts`).
|
||||
*/
|
||||
import { onMounted, onUnmounted } from "vue";
|
||||
import { useCommandsStore } from "./commands/store";
|
||||
|
|
@ -15,13 +16,16 @@ import EditorArea from "./components/editor/EditorArea.vue";
|
|||
import MainLayout from "./components/layout/MainLayout.vue";
|
||||
import NotificationStack from "./components/notifications/NotificationStack.vue";
|
||||
import RecoveryDialog from "./components/recovery/RecoveryDialog.vue";
|
||||
import SettingsDialog from "./components/settings/SettingsDialog.vue";
|
||||
import { useAppStore } from "./stores/app";
|
||||
import { useNotificationsStore } from "./stores/notifications";
|
||||
import { useSettingsStore } from "./stores/settings";
|
||||
import { startTheme } from "./theme";
|
||||
|
||||
const app = useAppStore();
|
||||
const notifications = useNotificationsStore();
|
||||
const commands = useCommandsStore();
|
||||
const settings = useSettingsStore();
|
||||
|
||||
/** Stops following the theme; set while mounted. */
|
||||
let stopTheme: (() => void) | null = null;
|
||||
|
|
@ -30,6 +34,7 @@ onMounted(() => {
|
|||
notifications.start();
|
||||
stopTheme = startTheme((error) => notifications.notifyError("theme.systemPreference", error));
|
||||
void commands.start();
|
||||
void settings.start();
|
||||
void app.loadAbout();
|
||||
});
|
||||
|
||||
|
|
@ -37,6 +42,7 @@ onUnmounted(() => {
|
|||
stopTheme?.();
|
||||
stopTheme = null;
|
||||
commands.stop();
|
||||
settings.stop();
|
||||
notifications.stop();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -51,6 +57,7 @@ onUnmounted(() => {
|
|||
</MainLayout>
|
||||
<RecoveryDialog />
|
||||
<CommandPalette />
|
||||
<SettingsDialog />
|
||||
<NotificationStack />
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue