Skip to content

Commit 9fb8b32

Browse files
committed
feat: only disable Klipper log rollover if printing
Signed-off-by: Pedro Lamas <[email protected]>
1 parent b9e0b2c commit 9fb8b32

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

src/components/common/RolloverLogsDialog.vue

+15-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@
1010
<v-radio-group
1111
v-model="application"
1212
hide-details
13+
mandatory
1314
class="mt-0"
1415
>
1516
<v-radio
1617
:label="$t('app.general.label.all')"
18+
:disabled="printerPrinting || printerPaused"
1719
value=""
1820
/>
19-
<v-radio value="klipper">
21+
<v-radio
22+
:disabled="printerPrinting || printerPaused"
23+
value="klipper"
24+
>
2025
<template #label>
2126
<div>Klipper <span class="secondary--text">(klippy.log)</span></div>
2227
</template>
@@ -43,6 +48,15 @@ export default class RolloverLogsDialog extends Mixins(StateMixin) {
4348
4449
application = ''
4550
51+
mounted () {
52+
if (
53+
this.printerPrinting ||
54+
this.printerPaused
55+
) {
56+
this.application = 'moonraker'
57+
}
58+
}
59+
4660
sendAccept () {
4761
SocketActions.serverLogsRollover(this.application || undefined)
4862

src/components/widgets/system/SystemOverviewCard.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<app-btn
2929
v-bind="attrs"
3030
icon
31-
:disabled="printerBusy"
3231
v-on="on"
3332
@click="rolloverLogsDialogOpen = true"
3433
>
@@ -117,13 +116,12 @@
117116
</template>
118117

119118
<script lang="ts">
120-
import { Component, Mixins } from 'vue-property-decorator'
119+
import { Component, Vue } from 'vue-property-decorator'
121120
import type { SystemInfo, CpuInfo, DistroInfo, Virtualization } from '@/store/server/types'
122-
import StateMixin from '@/mixins/state'
123121
import type { PrinterInfo } from '@/store/printer/types'
124122
125123
@Component({})
126-
export default class PrinterStatsCard extends Mixins(StateMixin) {
124+
export default class PrinterStatsCard extends Vue {
127125
rolloverLogsDialogOpen = false
128126
peripheralsDialogOpen = false
129127

0 commit comments

Comments
 (0)