diff --git a/src/components/panels/KlippyStatePanel.vue b/src/components/panels/KlippyStatePanel.vue index 58f1f8e50..48607c811 100644 --- a/src/components/panels/KlippyStatePanel.vue +++ b/src/components/panels/KlippyStatePanel.vue @@ -1,105 +1,83 @@ @@ -129,7 +107,7 @@ export default class KlippyStatePanel extends Mixins(BaseMixin) { mdiDownload = mdiDownload mdiPower = mdiPower - get klippy_message() { + get klippy_message(): string | null { return this.$store.state.server.klippy_message ?? null } @@ -148,6 +126,22 @@ export default class KlippyStatePanel extends Mixins(BaseMixin) { } } + get buttonClasses() { + return [this.messageType.color + '--text', 'my-1', 'w-100'] + } + + get serviceReportsKlipper() { + return `${this.$t('Panels.KlippyStatePanel.ServiceReports', { + service: 'Klipper', + })}: ${this.klipperState.toUpperCase()}` + } + + get serviceReportsMoonraker() { + return `${this.$t('Panels.KlippyStatePanel.ServiceReports', { + service: 'Moonraker', + })}: ${this.klipperState.toUpperCase()}` + } + restart() { this.$socket.emit('printer.restart', {}, { loading: 'restart' }) } diff --git a/src/locales/en.json b/src/locales/en.json index 4b25e5eb0..58c5c6aab 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -599,7 +599,9 @@ "KlippyStatePanel": { "CheckKlippyAndUdsAddress": "Please check if the Klipper service is running and klippy_uds_address is correctly configured in the moonraker.conf.", "FirmwareRestart": "Firmware Restart", + "KlipperLog": "Klipper Log", "MoonrakerCannotConnect": "Moonraker can't connect to Klipper!", + "MoonrakerLog": "Moonraker Log", "PowerOn": "Power on", "PrinterSwitchedOff": "Printer is powered off", "PrinterSwitchedOffDescription": "The printer is currently powered off and Klipper cannot connect. To power on the printer, click the button below:",