Default settings

This commit is contained in:
Romein van Buren 2022-07-13 11:21:59 +02:00
parent b258fb2285
commit 4f65212152
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49

View File

@ -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);
}