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:
copilot-swe-agent[bot]
2026-04-07 16:17:23 +00:00
committed by GitHub
parent 11ec4b4816
commit 1d4f104524
6 changed files with 46 additions and 79 deletions

View File

@@ -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