Skip to content

Commit

Permalink
Views: Configuiration-joystick: Fix shift and unbind buttons logic
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Manzoli <[email protected]>
  • Loading branch information
ArturoManzoli authored and patrickelectric committed Aug 23, 2024
1 parent 523e109 commit f7c2a25
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/views/ConfigurationJoystickView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,15 @@
class="flex flex-row justify-between w-full h-full align-center gap-x-16"
>
<div class="flex flex-col w-[30%] h-[100px] justify-around">
<v-btn variant="elevated" class="bg-[#FFFFFF33]">assign as Shift</v-btn>
<v-btn variant="elevated" class="bg-[#FFFFFF33]">Unmap input</v-btn>
<v-btn
variant="elevated"
class="bg-[#FFFFFF33]"
@click="updateButtonAction(input, shiftFunction as ProtocolAction)"
>Assign as Shift</v-btn
>
<v-btn variant="elevated" class="bg-[#FFFFFF33]" @click="unbindCurrentInput(input as JoystickButtonInput)"
>Unmap Input</v-btn
>
</div>
<div class="flex flex-col w-[300px] justify-evenly">
<ExpansiblePanel
Expand Down Expand Up @@ -487,7 +494,7 @@
</div>
</div>
<Transition>
<p v-if="showButtonFunctionAssignmentFeedback" class="text-lg font-medium">
<p v-if="showButtonFunctionAssignmentFeedback" class="text-lg font-medium mt-4">
{{ buttonFunctionAssignmentFeedback }}
</p>
</Transition>
Expand Down Expand Up @@ -628,6 +635,12 @@ type SearchTerms = {
[key: string]: string
}
const shiftFunction = {
protocol: 'cockpit-modifier-key',
id: 'shift',
name: 'Shift',
}
watch(
() => currentJoystick.value?.model,
(newModel) => {
Expand Down

0 comments on commit f7c2a25

Please sign in to comment.