fix: 1. 系统设置入口进来只会跳转到拥有权限访问的页面。

2. 优化登录样式
This commit is contained in:
2025-11-26 18:05:15 +08:00
parent efbf78246f
commit 1b0108e518
6 changed files with 179 additions and 28 deletions
+23 -11
View File
@@ -213,6 +213,7 @@ export default function Login() {
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [passwordLoginError, setPasswordLoginError] = useState<string | null>(null);
const [showPassword, setShowPassword] = useState(false);
// 从 loaderData 中获取错误信息
const oauthError = loaderData?.flashError;
@@ -466,17 +467,28 @@ export default function Login() {
<div className="form-group">
<label htmlFor="password" className="form-label"></label>
<input
type="password"
id="password"
name="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="form-input"
placeholder="请输入密码"
disabled={isLoading}
required
/>
<div className="password-input-wrapper">
<input
type={showPassword ? "text" : "password"}
id="password"
name="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="form-input"
placeholder="请输入密码"
disabled={isLoading}
required
/>
<button
type="button"
className="password-toggle-button"
onClick={() => setShowPassword(!showPassword)}
tabIndex={-1}
aria-label={showPassword ? "隐藏密码" : "显示密码"}
>
<i className={showPassword ? "ri-eye-off-line" : "ri-eye-line"}></i>
</button>
</div>
</div>
<button