app store only persist selected keys

This commit is contained in:
Gauthier Roebroeck 2025-12-08 14:51:44 +08:00
parent 4c209f6baa
commit e31653a310

View file

@ -4,10 +4,15 @@ import { useDisplay } from 'vuetify'
export const useAppStore = defineStore('app', {
state: () => ({
// persisted
drawer: !useDisplay().mobile.value.valueOf(),
theme: 'system',
rememberMe: false,
importBooksPath: '',
}),
persist: true,
persist: {
key: 'komga.nextui.app',
// explicitly state which keys are stored
pick: ['drawer', 'theme', 'rememberMe', 'importBooksPath'],
},
})