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