ADD: Multi device mocks

This commit is contained in:
Robert Kossessa
2024-02-07 15:49:33 +01:00
parent 8868fd3d25
commit b957c11526
4 changed files with 30 additions and 26 deletions

View File

@@ -18,6 +18,7 @@ export const useStore = defineStore('main', {
profileCategories: [],
selectedProfileId: null,
connected: false,
connectedDevices: ['test1', 'test2'],
selectedFeature: 'knob',
selectedKey: 'a',
currentConfigPage: 'mapping',
@@ -46,6 +47,7 @@ export const useStore = defineStore('main', {
selectedProfile: (state) => state.profiles.find(p => p.id === state.selectedProfileId),
currentConfigComponent: (state) => state.configPages[state.selectedFeature][state.currentConfigPage]?.component || WIP,
currentConfigPages: (state) => state.configPages[state.selectedFeature] || {},
multipleDevicesConnected: (state) => state.connectedDevices.length > 1,
}, actions: {
selectProfile(id) {
if (!this.profileIds.includes(id)) return false