UPD: Profile management

This commit is contained in:
Robert Kossessa
2024-01-27 03:46:35 +01:00
parent 7c6d75b3fb
commit 96b305b74d
2 changed files with 22 additions and 12 deletions

View File

@@ -1,9 +1,15 @@
import { reactive } from 'vue'
import { computed, reactive } from 'vue'
export const store = reactive({
device: {
profiles: [],
activeProfile: null,
activeProfileId: null,
activeProfile: computed(() => {
return store.device.profiles.find(p => p.id === store.device.activeProfileId)
}),
},
currentProfile: null,
currentProfileId: null,
currentProfile: computed(() => {
return store.device.profiles.find(p => p.id === store.currentProfileId)
}),
})