dashboard: collapsible credentials block; autofill: fix Pult username field
- Credentials wrapped in svc-credentials-wrap with toggle button and chevron - Credentials hidden by default, expand on click (CSS class toggle) - Autofill: add autofocus selector to catch fields like Zabbix name=name - Autofill: re-fill username after password fill if Pult/Zabbix cleared it Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,8 @@ _AUTOFILL_CONTENT_JS = r"""
|
||||
'input[name*="email" i]:not([type="password"]):not([type="hidden"]), ' +
|
||||
'input[id*="user" i]:not([type="password"]):not([type="hidden"]), ' +
|
||||
'input[id*="login" i]:not([type="password"]):not([type="hidden"]), ' +
|
||||
'input[id*="email" i]:not([type="password"]):not([type="hidden"])'
|
||||
'input[id*="email" i]:not([type="password"]):not([type="hidden"]), ' +
|
||||
'input[autofocus]:not([type="password"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"])'
|
||||
);
|
||||
for (const el of candidates) {
|
||||
if (isVisible(el)) return el;
|
||||
@@ -126,6 +127,11 @@ _AUTOFILL_CONTENT_JS = r"""
|
||||
console.log('[PortalAutofill] password filled');
|
||||
}
|
||||
}
|
||||
// Some apps (e.g. Zabbix) clear username after password events — re-fill if needed
|
||||
if (CREDS.login && u && u.value !== CREDS.login) {
|
||||
setNativeValue(u, CREDS.login);
|
||||
console.log('[PortalAutofill] user re-filled after password');
|
||||
}
|
||||
}
|
||||
|
||||
// Watch for SPA re-renders clearing the fields and re-fill continuously
|
||||
|
||||
Reference in New Issue
Block a user