fix: remove default admin username from login form
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Vendored
+1
-1
@@ -81,7 +81,7 @@
|
|||||||
<div class="tile login-card">
|
<div class="tile login-card">
|
||||||
<div class="settings-title">登录</div>
|
<div class="settings-title">登录</div>
|
||||||
<label class="field"><span class="label">用户名</span>
|
<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>
|
||||||
<label class="field"><span class="label">密码</span>
|
<label class="field"><span class="label">密码</span>
|
||||||
<input id="loginPass" type="password" class="field-input" autocomplete="current-password" />
|
<input id="loginPass" type="password" class="field-input" autocomplete="current-password" />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function LoginGate({ onOk }: Props) {
|
export default function LoginGate({ onOk }: Props) {
|
||||||
const [username, setUsername] = useState("admin");
|
const [username, setUsername] = useState("");
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [err, setErr] = useState<string | null>(null);
|
const [err, setErr] = useState<string | null>(null);
|
||||||
const [busy, setBusy] = useState(false);
|
const [busy, setBusy] = useState(false);
|
||||||
@@ -39,6 +39,7 @@ export default function LoginGate({ onOk }: Props) {
|
|||||||
value={username}
|
value={username}
|
||||||
onChange={(e) => setUsername(e.target.value)}
|
onChange={(e) => setUsername(e.target.value)}
|
||||||
autoComplete="username"
|
autoComplete="username"
|
||||||
|
placeholder="请输入用户名"
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user