mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 13:37:59 +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';
|
import { crossfade } from 'svelte/transition';
|
||||||
|
|
||||||
function createSettingsStore() {
|
function createSettingsStore() {
|
||||||
const s = writable({
|
const defaults = {
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
cols: 4,
|
cols: 4,
|
||||||
rows: 3,
|
rows: 3,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
const s = writable(defaults);
|
||||||
|
|
||||||
function updateStorage(val) {
|
function updateStorage(val) {
|
||||||
window.localStorage.setItem('statusdash', JSON.stringify(val));
|
window.localStorage.setItem('statusdash', {
|
||||||
|
...defaults,
|
||||||
|
...JSON.stringify(val),
|
||||||
|
});
|
||||||
s.set(val);
|
s.set(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user