fix: allow disabling main key

This commit is contained in:
Андрей Бобырев
2026-06-07 01:25:03 +03:00
parent caee0b4cff
commit dfa2703e61
3 changed files with 4 additions and 7 deletions

View File

@@ -1302,8 +1302,8 @@ function renderUsers() {
<strong>${escapeHtml(user.name)}</strong>${user.main ? ` <small>${escapeHtml(t("main"))}</small>` : ""}
</button>
<div class="status-control">
<label class="switch" title="${escapeAttr(user.main ? t("main") : (user.enabled ? t("disableKey") : t("enableKey")))}">
<input type="checkbox" data-toggle-user="${escapeAttr(user.name)}" ${user.enabled ? "checked" : ""} ${user.main || pending ? "disabled" : ""}>
<label class="switch" title="${escapeAttr(user.enabled ? t("disableKey") : t("enableKey"))}">
<input type="checkbox" data-toggle-user="${escapeAttr(user.name)}" ${user.enabled ? "checked" : ""} ${pending ? "disabled" : ""}>
<span></span>
</label>
<strong class="${user.enabled ? "state-on" : "state-off"}">${escapeHtml(pending ? t("applying") : (user.enabled ? t("enabled") : t("disabled")))}</strong>

View File

@@ -11,7 +11,7 @@
document.documentElement.dataset.theme = theme;
}());
</script>
<link rel="stylesheet" href="/styles.css?v=2.5.0-admin26">
<link rel="stylesheet" href="/styles.css?v=2.5.0-admin27">
</head>
<body>
<div class="app-shell">
@@ -482,6 +482,6 @@
<button id="qrCopyBtn" type="button" class="soft" data-i18n="copyLink">Copy link</button>
</div>
</div>
<script src="/app.js?v=2.5.0-admin26" type="module"></script>
<script src="/app.js?v=2.5.0-admin27" type="module"></script>
</body>
</html>