mobile download

This commit is contained in:
Macbook
2026-05-28 14:44:19 +09:00
parent e2816b037f
commit 3503ef33f5
152 changed files with 11021 additions and 687 deletions
+6 -17
View File
@@ -1,29 +1,18 @@
/**
* 지표 추가 팝업 — Main(주요지표) 탭 표시·적용 순서
* 지표 추가 팝업 — Main(주요지표) 탭 표시·적용 순서 (DB)
*/
import { MAIN_INDICATOR_TYPES } from './indicatorMainTab';
import { mergeIndicatorListOrder } from './indicatorListOrder';
const STORAGE_KEY = 'gc_indicator_main_tab_order';
import { getUiPreferences, patchUiPreferences } from './uiPreferencesDb';
export function loadMainTabOrder(): string[] | null {
try {
const raw = localStorage.getItem(STORAGE_KEY);
if (!raw) return null;
const parsed = JSON.parse(raw) as unknown;
if (!Array.isArray(parsed)) return null;
return parsed.filter((t): t is string => typeof t === 'string' && t.length > 0);
} catch {
return null;
}
const order = getUiPreferences().indicator?.mainTabOrder;
if (!order?.length) return null;
return order.filter((t): t is string => typeof t === 'string' && t.length > 0);
}
export function saveMainTabOrder(types: string[]): void {
try {
localStorage.setItem(STORAGE_KEY, JSON.stringify(types));
} catch {
/* quota */
}
patchUiPreferences({ indicator: { mainTabOrder: types } });
}
export function getOrderedMainIndicatorTypes(): string[] {