Files
HomeAssistantVS/custom_components/maintenance_supporter/frontend-src/helpers/storage-keys.ts
T
2026-07-14 23:57:03 -04:00

20 lines
818 B
TypeScript

/** localStorage keys for panel UI preferences — single source of truth.
*
* The VALUES are a compatibility contract: they are what users' browsers
* already have stored, so they must never change (the mixed msp-/full-name
* prefixes are historical and stay). Centralizing the names just makes a typo
* in one call site impossible — a DRY audit (2026-07-10) found every key
* duplicated inline at its get/set pair.
*/
export const LS_KEYS = {
overviewTab: "msp-overview-tab",
collapsedSections: "msp-collapsed-sections",
chartRange: "msp-chart-range",
chartHideOutliers: "msp-chart-hide-outliers",
taskSort: "maintenance_supporter_sort",
objectSort: "maintenance_supporter_object_sort",
groupBy: "maintenance_supporter_groupby",
objectView: "maintenance_supporter_object_view",
} as const;