From 13d4f6431f93a22660bd1a5555505e2642127dc7 Mon Sep 17 00:00:00 2001 From: Robert Kossessa Date: Sat, 23 Mar 2024 14:54:09 +0100 Subject: [PATCH] ADD: Midi CC action type --- .../components/config/actions/ActionCard.vue | 21 ++++++++++++------- .../config/actions/SendMidiCCAction.vue | 8 +++++++ 2 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 src/renderer/src/components/config/actions/SendMidiCCAction.vue diff --git a/src/renderer/src/components/config/actions/ActionCard.vue b/src/renderer/src/components/config/actions/ActionCard.vue index 02a9be1..31d9f53 100644 --- a/src/renderer/src/components/config/actions/ActionCard.vue +++ b/src/renderer/src/components/config/actions/ActionCard.vue @@ -20,7 +20,9 @@ @@ -40,7 +42,7 @@ :value="actionType" @select=" () => { - inputValue = key + typeInputValue = key open = false } " @@ -48,7 +50,7 @@ {{ actionType.label }} @@ -79,7 +81,9 @@ @@ -102,13 +106,13 @@ import { import { ref } from 'vue' import { cn } from '@renderer/lib/utils' import SendKeyAction from '@renderer/components/config/actions/SendKeyAction.vue' -import SendStringAction from '@renderer/components/config/actions/SendStringAction.vue' +import SendMidiCCAction from '@renderer/components/config/actions/SendMidiCCAction.vue' import ScrambleText from '@renderer/components/common/ScrambleText.vue' import { ChevronsUpDown, Check, GripHorizontal, Trash2, X } from 'lucide-vue-next' import { useElementSize } from '@vueuse/core' import { Action } from '@renderer/deviceStore' -defineProps({ +const props = defineProps({ actionIndex: { type: Number, required: false @@ -120,13 +124,14 @@ defineProps({ }) const actionTypeOptions = ref({ - key: { label: 'Press a Key', component: SendKeyAction } + key: { label: 'Press a Keyboard Key', component: SendKeyAction }, + midi: { label: 'Send a MIDI Control Change', component: SendMidiCCAction } }) const comboboxButton = ref(null) const { width } = useElementSize(comboboxButton) const open = ref(false) -const inputValue = ref('') +const typeInputValue = ref(props.action.type) const confirmDelete = ref(false) diff --git a/src/renderer/src/components/config/actions/SendMidiCCAction.vue b/src/renderer/src/components/config/actions/SendMidiCCAction.vue new file mode 100644 index 0000000..9b91a38 --- /dev/null +++ b/src/renderer/src/components/config/actions/SendMidiCCAction.vue @@ -0,0 +1,8 @@ + +