make SW use pinia cache instead of vuex

This commit is contained in:
Henry Jameson 2026-03-16 15:40:42 +02:00
commit 650785bb5b

View file

@ -34,14 +34,14 @@ function getWindowClients() {
} }
const setSettings = async () => { const setSettings = async () => {
const vuexState = await storage.getItem('vuex-lz') const piniaState = await storage.getItem('pinia-local-sync_config')
const locale = vuexState.config.interfaceLanguage || 'en' const locale = piniaState.prefsStorage.simple.interfaceLanguage || 'en'
i18n.locale = locale i18n.locale = locale
const notificationsNativeArray = Object.entries( const notificationsNativeArray = Object.entries(
vuexState.config.notificationNative, piniaState.prefsStorage.simple.notificationNative,
) )
state.webPushAlwaysShowNotifications = state.webPushAlwaysShowNotifications =
vuexState.config.webPushAlwaysShowNotifications piniaState.prefsStorage.simple.webPushAlwaysShowNotifications
state.allowedNotificationTypes = new Set( state.allowedNotificationTypes = new Set(
notificationsNativeArray notificationsNativeArray