mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
more work on settings
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import {acceptHMRUpdate, defineStore} from 'pinia'
|
||||
import {useStorage} from "@vueuse/core";
|
||||
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore";
|
||||
import {ApiApi, UserPreference} from "@/openapi";
|
||||
import {ApiApi, Space, UserPreference} from "@/openapi";
|
||||
|
||||
const DEVICE_SETTINGS_KEY = 'TANDOOR_DEVICE_SETTINGS'
|
||||
const USER_PREFERENCE_KEY = 'TANDOOR_USER_PREFERENCE'
|
||||
const ACTIVE_SPACE_KEY = 'TANDOOR_ACTIVE_SPACE'
|
||||
|
||||
class DeviceSettings {
|
||||
|
||||
@@ -29,6 +30,11 @@ export const useUserPreferenceStore = defineStore('user_preference_store', () =>
|
||||
*/
|
||||
let userSettings = useStorage(USER_PREFERENCE_KEY, {} as UserPreference)
|
||||
|
||||
/**
|
||||
* database user settings, cache in local storage in case application is started offline
|
||||
*/
|
||||
let activeSpace = useStorage(ACTIVE_SPACE_KEY, {} as Space)
|
||||
|
||||
/**
|
||||
* retrieve user settings from DB
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user