From 6b39660a2becf324009f6796351f4b2f93ec4888 Mon Sep 17 00:00:00 2001 From: QuickMythril Date: Fri, 9 Feb 2024 20:25:10 -0500 Subject: [PATCH] Disable buttons when offline --- .../core/node-management/node-management.src.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/plugins/core/node-management/node-management.src.js b/plugins/plugins/core/node-management/node-management.src.js index ca128f4c..3716c024 100644 --- a/plugins/plugins/core/node-management/node-management.src.js +++ b/plugins/plugins/core/node-management/node-management.src.js @@ -154,9 +154,7 @@ class NodeManagement extends LitElement {

${translate("nodepage.nchange1")} ${this.nodeDomain}

- this.openBootstrapDialog()}>restart_alt ${translate("tour.tour18")} - this.restartNode()}>360 ${translate("nodepage.nchange33")} - ${this.renderStartStopButton()} + ${this.renderButtons()}
${translate("nodepage.nchange2")} ${this.upTime}


@@ -417,14 +415,18 @@ class NodeManagement extends LitElement { }) } - renderStartStopButton() { + renderButtons() { if (!isElectron()) { - return html` this.stopNode()}>dangerous ${translate("nodepage.nchange31")}` + return html` this.stopNode()}>dangerous ${translate("nodepage.nchange31")} + this.openBootstrapDialog()}>restart_alt ${translate("tour.tour18")} + this.restartNode()}>360 ${translate("nodepage.nchange33")}` } else { if (this.upTime === "offline") { return html` this.startNode()}>play_circle ${translate("nodepage.nchange35")}` } else { - return html` this.stopNode()}>stop_circle ${translate("nodepage.nchange31")}` + return html` this.stopNode()}>stop_circle ${translate("nodepage.nchange31")} + this.openBootstrapDialog()}>restart_alt ${translate("tour.tour18")} + this.restartNode()}>360 ${translate("nodepage.nchange33")}` } } }