Replace security warning modal with inline banner in Preferences section
Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/e7946288-08c7-4081-85dd-6780f1eba17a Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
11ec4b4816
commit
1d4f104524
@@ -2,20 +2,12 @@
|
||||
|
||||
// ── Legacy security warning ───────────────────────────────────────
|
||||
|
||||
function openSecurityWarningModal(message) {
|
||||
if ($securityWarningMessage) $securityWarningMessage.textContent = message;
|
||||
if ($securityWarningModal) $securityWarningModal.classList.add("open");
|
||||
}
|
||||
|
||||
function closeSecurityWarningModal() {
|
||||
if ($securityWarningModal) $securityWarningModal.classList.remove("open");
|
||||
}
|
||||
|
||||
async function checkLegacySecurity() {
|
||||
try {
|
||||
var data = await apiFetch("/api/security/status");
|
||||
if (data && data.status === "legacy") {
|
||||
openSecurityWarningModal(data.warning || "This machine may have a known factory password. Please change your passwords immediately.");
|
||||
_securityIsLegacy = true;
|
||||
_securityWarningMessage = data.warning || "This machine may have a known factory password. Please change your passwords immediately.";
|
||||
}
|
||||
} catch (_) {
|
||||
// Non-fatal — silently ignore if the endpoint is unreachable
|
||||
|
||||
Reference in New Issue
Block a user