UPD: Make auto select optional
This commit is contained in:
@@ -46,7 +46,8 @@ export const useAppStore = defineStore('app', {
|
|||||||
},
|
},
|
||||||
previewDeviceModel: localStorage.getItem('previewDeviceModel') || 'nanoOne',
|
previewDeviceModel: localStorage.getItem('previewDeviceModel') || 'nanoOne',
|
||||||
profileManagerDragging: false,
|
profileManagerDragging: false,
|
||||||
showProfileConfig: false
|
showProfileConfig: false,
|
||||||
|
selectOnInput: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
@@ -76,6 +77,9 @@ export const useAppStore = defineStore('app', {
|
|||||||
setShowProfileConfig(show) {
|
setShowProfileConfig(show) {
|
||||||
show = false // TODO: Remove this / replace with actual logic
|
show = false // TODO: Remove this / replace with actual logic
|
||||||
this.showProfileConfig = show
|
this.showProfileConfig = show
|
||||||
|
},
|
||||||
|
toggleSelectOnInput() {
|
||||||
|
this.selectOnInput = !this.selectOnInput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -80,6 +80,11 @@
|
|||||||
<p>{{ previewDeviceNames[appStore.previewDeviceModel || 'nanoOne'] }}</p>
|
<p>{{ previewDeviceNames[appStore.previewDeviceModel || 'nanoOne'] }}</p>
|
||||||
<MenubarShortcut>⌘S</MenubarShortcut>
|
<MenubarShortcut>⌘S</MenubarShortcut>
|
||||||
</MenubarItem>
|
</MenubarItem>
|
||||||
|
<MenubarItem class="flex justify-between" @click="appStore.toggleSelectOnInput">
|
||||||
|
<p>Auto Select: </p>
|
||||||
|
<p>{{ appStore.selectOnInput ? 'On' : 'Off' }}</p>
|
||||||
|
<MenubarShortcut>⌘K</MenubarShortcut>
|
||||||
|
</MenubarItem>
|
||||||
<MenubarSeparator />
|
<MenubarSeparator />
|
||||||
<MenubarItem
|
<MenubarItem
|
||||||
>{{ $t('navbar.device.export') }}
|
>{{ $t('navbar.device.export') }}
|
||||||
|
|||||||
@@ -703,12 +703,12 @@ export const initializeDevices = () => {
|
|||||||
}
|
}
|
||||||
if (update.p !== undefined) {
|
if (update.p !== undefined) {
|
||||||
deviceStore.setPosition(update.p)
|
deviceStore.setPosition(update.p)
|
||||||
appStore.selectConfigFeature('knob')
|
if (appStore.selectOnInput) appStore.selectConfigFeature('knob')
|
||||||
}
|
}
|
||||||
if (update.kd !== undefined) {
|
if (update.kd !== undefined) {
|
||||||
const keyLabel = deviceStore.keyLabels[update.kd]
|
const keyLabel = deviceStore.keyLabels[update.kd]
|
||||||
deviceStore.keyStates[keyLabel] = true
|
deviceStore.keyStates[keyLabel] = true
|
||||||
appStore.selectKey(keyLabel)
|
if (appStore.selectOnInput) appStore.selectKey(keyLabel)
|
||||||
}
|
}
|
||||||
if (update.ku !== undefined) {
|
if (update.ku !== undefined) {
|
||||||
deviceStore.keyStates[deviceStore.keyLabels[update.ku]] = false
|
deviceStore.keyStates[deviceStore.keyLabels[update.ku]] = false
|
||||||
|
|||||||
Reference in New Issue
Block a user