user module + translations
This commit is contained in:
+8
-1
@@ -9,10 +9,17 @@ prefs = reactive(prefs ? JSON.parse(prefs) : {
|
||||
}
|
||||
})
|
||||
|
||||
let snackbar = reactive({
|
||||
show: false,
|
||||
text: '',
|
||||
color: 'info',
|
||||
timeout: 3000,
|
||||
})
|
||||
|
||||
watch(prefs, (newPrefs) => {
|
||||
localStorage.setItem('prefs', JSON.stringify(newPrefs))
|
||||
}, { deep: true })
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
state: () => ({ prefs }),
|
||||
state: () => ({ prefs, snackbar }),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user