mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 05:27:58 +00:00
Default settings
This commit is contained in:
parent
b258fb2285
commit
4f65212152
@ -3,14 +3,19 @@ import { quintOut } from 'svelte/easing';
|
||||
import { crossfade } from 'svelte/transition';
|
||||
|
||||
function createSettingsStore() {
|
||||
const s = writable({
|
||||
const defaults = {
|
||||
theme: 'dark',
|
||||
cols: 4,
|
||||
rows: 3,
|
||||
});
|
||||
};
|
||||
|
||||
const s = writable(defaults);
|
||||
|
||||
function updateStorage(val) {
|
||||
window.localStorage.setItem('statusdash', JSON.stringify(val));
|
||||
window.localStorage.setItem('statusdash', {
|
||||
...defaults,
|
||||
...JSON.stringify(val),
|
||||
});
|
||||
s.set(val);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user