From d7814ff6df876b9fbf289d0b069976a7343ca849 Mon Sep 17 00:00:00 2001 From: jamesread Date: Sun, 20 Oct 2024 22:56:40 +0100 Subject: [PATCH] bugfix: If a button is disabled in the API, render it disabled [skip ci] --- webui.dev/js/ActionButton.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webui.dev/js/ActionButton.js b/webui.dev/js/ActionButton.js index 288ea8b..359749e 100644 --- a/webui.dev/js/ActionButton.js +++ b/webui.dev/js/ActionButton.js @@ -33,6 +33,10 @@ class ActionButton extends ExecutionFeedbackButton { this.setAttribute('role', 'none') this.setAttribute('id', 'actionButton-' + this.actionId) + if (!json.canExec) { + this.btn.disabled = true + } + this.btn.setAttribute('id', 'actionButtonInner-' + this.actionId) this.btn.title = json.title this.btn.onclick = () => {