fix(auth): stop pre-filling login username on new devices

Remove username_hint from hub auth status API and disable autocomplete on hub and instance login forms.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-17 19:21:46 +08:00
parent b6acbf4b2c
commit be7f5d5072
6 changed files with 15 additions and 17 deletions
+3 -4
View File
@@ -38,14 +38,14 @@
<div class="login-sub">CRYPTO MONITOR · COMMAND</div>
</div>
</div>
<form id="login-form" class="login-form" autocomplete="on">
<form id="login-form" class="login-form" autocomplete="off">
<label class="field">
<span>用户名</span>
<input type="text" name="username" id="login-username" required autocomplete="username" />
<input type="text" name="username" id="login-username" required autocomplete="off" autocapitalize="off" spellcheck="false" />
</label>
<label class="field">
<span>密码</span>
<input type="password" name="password" id="login-password" required autocomplete="current-password" />
<input type="password" name="password" id="login-password" required autocomplete="new-password" />
</label>
<button type="submit" class="primary login-submit" id="login-submit">进入系统</button>
<p id="login-err" class="login-err" hidden></p>
@@ -113,7 +113,6 @@
.then((r) => r.json())
.then((s) => {
if (!s.required || s.logged_in) gotoAfterLogin(null, next);
if (s.username_hint && !userInput.value) userInput.value = s.username_hint;
})
.catch(() => {});