[feat](trx-frontend-http): disable plugin enable/disable for rx role
Disable plugin toggle buttons for rx-authenticated users: - FT8 decode toggle - WSPR decode toggle - CW auto checkbox RX users cannot enable/disable decoders, preventing unintended configuration changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -155,6 +155,21 @@ function applyAuthRestrictions() {
|
|||||||
if (jogWheel) jogWheel.style.opacity = "0.5";
|
if (jogWheel) jogWheel.style.opacity = "0.5";
|
||||||
jogButtons.forEach(btn => btn.disabled = true);
|
jogButtons.forEach(btn => btn.disabled = true);
|
||||||
|
|
||||||
|
// Disable plugin enable/disable buttons
|
||||||
|
const pluginToggleBtns = [
|
||||||
|
"ft8-decode-toggle-btn",
|
||||||
|
"wspr-decode-toggle-btn",
|
||||||
|
"cw-auto"
|
||||||
|
];
|
||||||
|
pluginToggleBtns.forEach(id => {
|
||||||
|
const btn = document.getElementById(id);
|
||||||
|
if (btn && btn.tagName === "BUTTON") {
|
||||||
|
btn.disabled = true;
|
||||||
|
} else if (btn && btn.type === "checkbox") {
|
||||||
|
btn.disabled = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Hide TX-specific UI but keep controls visible (disabled)
|
// Hide TX-specific UI but keep controls visible (disabled)
|
||||||
if (txLimitRow) txLimitRow.style.opacity = "0.5";
|
if (txLimitRow) txLimitRow.style.opacity = "0.5";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user