This commit is contained in:
2025-12-26 21:32:31 +08:00
parent 3654746f6a
commit b256ef20bf
3 changed files with 23 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ export const App = () => {
const firstStore = useFirstStore();
const [username, setUsername] = useState<string>("");
const [nickname, setNickname] = useState<string>("");
const [password, setPassword] = useState<string>("");
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
@@ -51,6 +52,7 @@ export const App = () => {
const res = await firstStore.updateUserInfo({
username,
nickname,
password,
});
};
@@ -138,6 +140,20 @@ export const App = () => {
/>
</div>
<div>
<label className="block text-sm font-medium text-white/90 mb-3">
</label>
<input
type="password"
value={password ?? ""}
onChange={(e) => setPassword(e.target.value)}
disabled={!canChange}
className="w-full px-5 py-3 rounded-xl border-2 focus:outline-none focus:ring-2 focus:ring-white/50 focus:border-white/50 backdrop-blur-sm bg-white/5 text-white placeholder-white/40 border-white/20 disabled:bg-white/5 disabled:cursor-not-allowed disabled:border-white/10 disabled:text-white/40 transition-all duration-200"
placeholder="输入密码"
/>
</div>
<button
onClick={handleSubmit}
disabled={!canChange}