Files
Homarr/tools/config.ts

17 lines
294 B
TypeScript
Raw Normal View History

2022-04-27 03:12:33 +02:00
export function loadConfig(path: string): Config | null {
const item = localStorage.getItem(path);
if (!item) {
return null;
}
try {
return JSON.parse(item) as Config;
} catch (e) {
return null;
}
}
export interface Config {
2022-04-27 20:10:51 +02:00
searchUrl: string;
2022-04-27 03:12:33 +02:00
searchBar: boolean,
}