fix(mobile): leave login usernames blank

Refs #74
This commit is contained in:
tianma-if committed 2026-10-02 21:57:59 +08:00
1 parent a9ca323392
commit e2ba982df8
2 files changed
+3 -5

No files matched your search

@@ -4,7 +4,7 @@ import Pow
struct LoginView: View {
@Environment(AppEnvironment.self) private var env
@State private var baseUrl = ""
@State private var username = "admin"
@State private var username = ""
@State private var password = ""
@State private var error: String?
@State private var submitting = false
@@ -75,7 +75,7 @@ struct LoginView: View {
field(
env.preferences.t("用户名", en: "Username", ja: "ユーザー名"),
placeholder: "owner",
placeholder: "",
text: $username,
keyboard: .default,
secure: false
+1 -3
View File
@@ -24,7 +24,7 @@ export const LoginScreen = () => {
refreshLoginThemeStyles(resolvedTheme);
const { signIn } = useSession();
const [baseUrl, setBaseUrl] = useState("");
const [username, setUsername] = useState("admin");
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [error, setError] = useState<string | null>(null);
const [submitting, setSubmitting] = useState(false);
@@ -89,8 +89,6 @@ export const LoginScreen = () => {
autoCapitalize="none"
autoCorrect={false}
onChangeText={setUsername}
placeholder="owner"
placeholderTextColor="#94a3b8"
style={styles.input}
value={username}
/>