fallback and 404
This commit is contained in:
@@ -47,3 +47,34 @@ export const storedLocation = persisted('stored_location', defaultLocation as Ge
|
||||
export type Theme = 'system' | 'light' | 'dark';
|
||||
|
||||
export const storedTheme = persisted<Theme>('theme', 'system');
|
||||
|
||||
/** Selected forecast model, shared across the whole site. */
|
||||
export const storedModel = persisted<string>('selected_model', 'best_match');
|
||||
|
||||
/** Which variables are visible in the hourly table and the meteograms. */
|
||||
export interface VariablePrefs {
|
||||
table: Record<string, boolean>;
|
||||
charts: Record<string, boolean>;
|
||||
}
|
||||
|
||||
export const defaultVariablePrefs: VariablePrefs = {
|
||||
table: {
|
||||
icons: true,
|
||||
temperature: true,
|
||||
feels: true,
|
||||
wind: true,
|
||||
humidity: true,
|
||||
clouds: true,
|
||||
precipitation: true
|
||||
},
|
||||
charts: {
|
||||
temperature: true,
|
||||
cloud_cover: true,
|
||||
precipitation: true,
|
||||
precipitation_probability: true,
|
||||
wind: true,
|
||||
humidity: true
|
||||
}
|
||||
};
|
||||
|
||||
export const storedVariablePrefs = persisted<VariablePrefs>('variable_prefs', defaultVariablePrefs);
|
||||
|
||||
Reference in New Issue
Block a user