mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-10 10:17:05 +01:00
setup: missing panel switch trigger
password panel should not show up on initial page load in normal mode
This commit is contained in:
@@ -146,8 +146,10 @@ function initWebMode(value) {
|
||||
|
||||
if (1 === value) {
|
||||
layout.classList.add("initial");
|
||||
showPanelByName("password");
|
||||
}
|
||||
|
||||
showPanelByName(
|
||||
(1 === value) ? "password" : "status");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user