fix: remove default admin username from login form

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-02 09:35:11 +08:00
parent d78e59c125
commit 74021dae08
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -81,7 +81,7 @@
<div class="tile login-card">
<div class="settings-title">登录</div>
<label class="field"><span class="label">用户名</span>
<input id="loginUser" class="field-input" value="admin" autocomplete="username" />
<input id="loginUser" class="field-input" value="" autocomplete="username" placeholder="请输入用户名" />
</label>
<label class="field"><span class="label">密码</span>
<input id="loginPass" type="password" class="field-input" autocomplete="current-password" />
+2 -1
View File
@@ -6,7 +6,7 @@ type Props = {
};
export default function LoginGate({ onOk }: Props) {
const [username, setUsername] = useState("admin");
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [err, setErr] = useState<string | null>(null);
const [busy, setBusy] = useState(false);
@@ -39,6 +39,7 @@ export default function LoginGate({ onOk }: Props) {
value={username}
onChange={(e) => setUsername(e.target.value)}
autoComplete="username"
placeholder="请输入用户名"
autoFocus
/>
</label>