Skip to content

Commit

Permalink
fix: disable led controls if klippy not ready
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Oct 17, 2024
1 parent b728bc5 commit ff2e4a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/ui/AppColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
left
max-width="260"
:close-on-content-click="false"
:disabled="disabled"
>
<template #activator="{ on, attrs }">
<v-btn
v-if="!dot"
v-bind="attrs"
:color="controlColor"
:disabled="disabled"
outlined
small
v-on="on"
Expand All @@ -21,6 +23,7 @@
v-else
v-bind="attrs"
:color="controlColor"
:disabled="disabled"
v-on="on"
>
$circle
Expand Down Expand Up @@ -193,6 +196,9 @@ export default class AppColorPicker extends Vue {
@Prop({ type: String, default: 'RGB' })
readonly supportedChannels!: string
@Prop({ type: Boolean })
readonly disabled?: boolean
@Ref('card')
readonly card!: Vue
Expand Down
2 changes: 2 additions & 0 deletions src/components/widgets/outputs/OutputLed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
align-self="center"
cols="5"
class="text-body-1 py-0"
:class="{ 'text--disabled': !klippyReady }"
>
{{ led.prettyName }}
</v-col>
Expand All @@ -16,6 +17,7 @@
:white.sync="whiteValue"
:title="led.prettyName"
:supported-channels="supportedChannels"
:disabled="!klippyReady"
dot
/>
</v-col>
Expand Down

0 comments on commit ff2e4a1

Please sign in to comment.