fix: a first visit opens the ribbon, not the floating island

The tabbed chrome is the layout users know; the stored choice still wins.
This commit is contained in:
Steffen Becker committed 2026-08-17 20:03:06 +02:00
1 parent 95530c6f07
commit 501bfe501f
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ compared. Everything the ribbon drives is the same editor, through the same comm
## The mode switch
`chromeMode: 'classic' | 'ribbon'` lives in `storage/theme.ts` beside the other UI-chrome prefs
(`edentext-chrome`, default `'classic'`). `App.svelte` forks on it: the ribbon docks as a plain
(`edentext-chrome`, default `'ribbon'`). `App.svelte` forks on it: the ribbon docks as a plain
flex child, the island keeps its absolute overlay. Reachable from both sides — the theme dropdown
in classic, the strip's appearance menu in the ribbon.
+1 -1
View File
@@ -31,7 +31,7 @@ All keys share the `edentext-` prefix — a namespace, not a description: on Git
- **Recent files:** `edentext-recent-files` — `{id, name, at}` per entry, newest first, eight kept (`recentFiles.ts`). Only the label lives here: the `FileSystemFileHandle` that reopens one is structured-cloneable but not JSON, so it sits in the `edentext-recent` IndexedDB store under the same id, and each write sweeps the handles no entry names. Two handles compare only through `isSameEntry`, which is async — hence the walk when recording a file already in the list. Reopening re-asks for permission (the API drops it on reload); a refusal, a moved file or a browser with no picker leaves the entry unopenable, and it is dropped with a message instead of failing again.
- **Theme:** `edentext-theme` — `'light' | 'dark' | 'allBlack' | 'auto'`.
- **Toolbar expanded:** `edentext-toolbar-expanded` — boolean string.
- **Chrome:** `edentext-chrome` — `'classic' | 'ribbon'`; absent = classic.
- **Chrome:** `edentext-chrome` — `'classic' | 'ribbon'`; absent = ribbon.
- **Ribbon collapsed:** `edentext-ribbon-collapsed` — boolean string; absent = expanded.
- **Formatting marks:** `edentext-formatting-marks` — boolean string.
- **Ruler:** `edentext-ruler` — boolean string; absent = on.
+1 -1
View File
@@ -36,7 +36,7 @@ export function saveToolbarExpanded(expanded: boolean): void {
}
export function loadChromeMode(): ChromeMode {
return localStorage.getItem(CHROME_KEY) === 'ribbon' ? 'ribbon' : 'classic';
return localStorage.getItem(CHROME_KEY) === 'classic' ? 'classic' : 'ribbon';
}
export function saveChromeMode(mode: ChromeMode): void {