xr
This commit is contained in:
+13
-3
@@ -1,8 +1,18 @@
|
||||
// Utilities
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, reactive, watch } from 'vue'
|
||||
|
||||
let prefs = localStorage.getItem('prefs')
|
||||
prefs = reactive(prefs ? JSON.parse(prefs) : {
|
||||
xr: {
|
||||
depthSense: true
|
||||
}
|
||||
})
|
||||
|
||||
watch(prefs, (newPrefs) => {
|
||||
localStorage.setItem('prefs', JSON.stringify(newPrefs))
|
||||
}, { deep: true })
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
state: () => ({
|
||||
//
|
||||
}),
|
||||
state: () => ({ prefs }),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user