try strip desktop

This commit is contained in:
Vincent van der Wal
2026-08-01 10:32:22 +02:00
parent 2f86d86165
commit 99c1a89537
6 changed files with 442 additions and 305 deletions
+31
View File
@@ -86,6 +86,37 @@ export const defaultVariablePrefs: VariablePrefs = {
export const storedVariablePrefs = persisted<VariablePrefs>('variable_prefs', defaultVariablePrefs);
/** Order of the hourly-table rows (visibility is the separate toggle above). */
export const defaultTableRowOrder: string[] = [
'icons',
'temperature',
'feels',
'dew_point',
'wind',
'gusts',
'humidity',
'clouds',
'pressure',
'uv',
'visibility',
'precipitation',
'snowfall'
];
export const storedTableRowOrder = persisted<string[]>('table_row_order_v1', defaultTableRowOrder);
/**
* Normalizes a stored row order against the known rows: drops keys that no
* longer exist and appends new rows (added after the user last saved) at the
* end, so stored orders survive app updates.
*/
export function mergeTableRowOrder(stored: string[]): string[] {
return [
...stored.filter((k) => defaultTableRowOrder.includes(k)),
...defaultTableRowOrder.filter((k) => !stored.includes(k))
];
}
/** Hourly table interval: 3-hourly (default) or 1-hourly. */
export const storedHourlyInterval = persisted<1 | 3>('hourly_interval', 3);