feat(state): nav panel store and expanded prefs

This commit is contained in:
ginnoir
2026-06-11 21:10:07 -05:00
parent 73d836fe96
commit 9b2793b264
4 changed files with 90 additions and 2 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
const PREFS_KEY = 'idlegame:prefs:v1';
const PREFS_KEY = 'idlegame:prefs:v2';
export type StoryOpenMode = 'auto' | 'choices-only' | 'manual';
export type ActionDetailMode = 'inline' | 'hover' | 'info-button';
@@ -6,11 +6,15 @@ export type ActionDetailMode = 'inline' | 'hover' | 'info-button';
export interface GamePrefs {
storyOpenMode: StoryOpenMode;
actionDetailMode: ActionDetailMode;
collapsedActionGroups: Record<string, boolean>;
showEventLog: boolean;
}
const DEFAULTS: GamePrefs = {
storyOpenMode: 'auto',
actionDetailMode: 'inline',
collapsedActionGroups: {},
showEventLog: true,
};
export function getPrefs(): GamePrefs {