setup: missing panel switch trigger

password panel should not show up on initial page load in normal mode
This commit is contained in:
Maxim Prokhorov
2024-07-30 01:18:53 +03:00
parent 8fcf4a842d
commit 4fda84082a
2 changed files with 6 additions and 4 deletions

View File

@@ -146,8 +146,10 @@ function initWebMode(value) {
if (1 === value) {
layout.classList.add("initial");
showPanelByName("password");
}
showPanelByName(
(1 === value) ? "password" : "status");
}
/**

View File

@@ -12,7 +12,7 @@ import {
addEnumerables,
setOriginalsFromValues,
variableListeners,
listenEnumerableLabel,
listenEnumerableTarget,
} from './settings.mjs';
/** @param {Event} event */
@@ -50,7 +50,7 @@ function initToggle(id) {
const [label] = line.querySelectorAll("label");
label.setAttribute("for", realId);
listenEnumerableLabel(label, id, "relay");
listenEnumerableTarget(label, id, "relay");
const toggle = /** @type {!HTMLInputElement} */
(line.querySelector("input[type='checkbox']"));
@@ -146,7 +146,7 @@ export function createNodeList(id, values, keyPrefix) {
values.forEach((value, index) => {
mergeTemplate(container, template.with(
(label, input) => {
listenEnumerableLabel(label, index, "relay");
listenEnumerableTarget(label, index, "relay");
input.name = keyPrefix;
input.value = value;