From f69a0cf4983a356544b43cfb980a85be6d1f74c7 Mon Sep 17 00:00:00 2001 From: fujr Date: Sat, 12 Apr 2025 16:46:20 +0800 Subject: [PATCH] feat: Enable or disable mode button based on configuration --- luci/luci-app-qmodem/luasrc/view/qmodem/modem_debug.htm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/luci/luci-app-qmodem/luasrc/view/qmodem/modem_debug.htm b/luci/luci-app-qmodem/luasrc/view/qmodem/modem_debug.htm index 24ee156..0e33ef6 100644 --- a/luci/luci-app-qmodem/luasrc/view/qmodem/modem_debug.htm +++ b/luci/luci-app-qmodem/luasrc/view/qmodem/modem_debug.htm @@ -660,6 +660,13 @@ this.init_ele(); } + if (this.config.disable_mode_btn == 0 || this.config.disable_mode_btn == undefined) { + this.mode_btn.disabled = false; + } + else{ + this.mode_btn.disabled = true; + } + for (let key in this.config.mode){ if (this.avalibale_mode.includes(key) == false) {