Skip to content

Commit

Permalink
feat: power plugin now respects locked_while_printing flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Jan 22, 2021
1 parent 1d215d6 commit 9034968
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/widgets/SystemCommandsWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<v-list-item
v-for="(device, index) in powerDevices"
:key="index"
:disabled="(device.status === 'error' || device.status === 'init' || printerPrinting)"
:disabled="(device.status === 'error' || device.status === 'init' || (printerPrinting && device.locked_while_printing))"
@click="togglePowerDevice(device, `${waits.onDevicePowerToggle}${device.device}`)"
:loading="hasWait(`${waits.onDevicePowerToggle}${device.device}`)"
:color="(device.status === 'error') ? 'error' : 'secondary'"
Expand Down
1 change: 1 addition & 0 deletions src/store/devicePower/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export interface Device {
device: string;
status: 'init' | 'on' | 'off' | 'error';
type: 'gpio' | 'tplink_smartplug';
locked_while_printing: boolean;
}

0 comments on commit 9034968

Please sign in to comment.