@owdproject/core
Version:
<p align="center"> <img width="160" height="160" src="https://avatars.githubusercontent.com/u/65117737?s=160&v=4" /> </p> <h1 align="center">Open Web Desktop</h1> <h3 align="center"> A modular framework for building web-based desktop experiences. </h3
46 lines (43 loc) • 742 B
text/typescript
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useDesktopStore = defineStore(
'owd/desktop',
() => {
const state = ref<{
workspace: {
overview: boolean
active: string
list: string[]
}
volume: {
master: number
}
window: {
positionZ: number
}
defaultApps: {[key: string]: string}
}>({
workspace: {
overview: false,
active: '',
list: [],
},
volume: {
master: 100,
},
window: {
positionZ: 0,
},
defaultApps: {}
})
return {
state,
}
},
{
// @ts-expect-error
persistedState: {
persist: true,
},
},
)