feat(state): nav panel store and expanded prefs
This commit is contained in:
+5
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user