From 423e2a19d4521eb6a50ff9b7a2a168e0c5a03d6d Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Wed, 20 Nov 2024 22:56:14 +0100 Subject: [PATCH] fix: fix reference link in editor while printing (#2050) --- src/components/TheEditor.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/TheEditor.vue b/src/components/TheEditor.vue index 8a14bd2b3..f122c2ca0 100644 --- a/src/components/TheEditor.vue +++ b/src/components/TheEditor.vue @@ -285,10 +285,14 @@ export default class TheEditor extends Mixins(BaseMixin) { return this.$store.state.server.system_info?.available_services ?? [] } - get restartServiceName() { + get restartAllowedOrPossible() { if (!this.isWriteable) return null if (['printing', 'paused'].includes(this.printer_state)) return null + return true + } + + get restartServiceName() { // check for generic services .conf (like moonraker.conf, crowsnest.conf, sonar.conf) if (this.availableServices.includes(this.filenameWithoutExtension) && this.fileExtension === 'conf') return this.filenameWithoutExtension @@ -309,6 +313,8 @@ export default class TheEditor extends Mixins(BaseMixin) { } get restartServiceNameExists() { + if (!this.restartAllowedOrPossible) return false + // hide the button, if there is no service found if (this.restartServiceName === null) return false