전략편집기 병합
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export type StrategyEditorMode = 'graph' | 'list';
|
||||
|
||||
const STORAGE_KEY = 'gc_se_editor_mode';
|
||||
|
||||
export function loadEditorMode(): StrategyEditorMode {
|
||||
try {
|
||||
const raw = localStorage.getItem(STORAGE_KEY);
|
||||
return raw === 'list' ? 'list' : 'graph';
|
||||
} catch {
|
||||
return 'graph';
|
||||
}
|
||||
}
|
||||
|
||||
export function saveEditorMode(mode: StrategyEditorMode): void {
|
||||
try {
|
||||
localStorage.setItem(STORAGE_KEY, mode);
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user