From 21be7cef581773793492d5d35190ca96578c4c07 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Tue, 24 Mar 2026 15:20:00 +0800 Subject: [PATCH] fix Login --- punchnet/Views/Login/LoginView.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/punchnet/Views/Login/LoginView.swift b/punchnet/Views/Login/LoginView.swift index faf5dde..c46cf5e 100644 --- a/punchnet/Views/Login/LoginView.swift +++ b/punchnet/Views/Login/LoginView.swift @@ -51,12 +51,13 @@ struct LoginView: View { // 动态内容区 ZStack { - if authMethod == .token { - LoginTokenView() - .transition(.move(edge: .trailing).combined(with: .opacity)) - } else { + switch authMethod { + case .account: LoginAccountView(username: self.username ?? "") .transition(.move(edge: .leading).combined(with: .opacity)) + case .token: + LoginTokenView() + .transition(.move(edge: .trailing).combined(with: .opacity)) } } .animation(.spring(response: 0.3, dampingFraction: 0.8), value: authMethod) @@ -77,7 +78,6 @@ struct LoginView: View { .padding(.bottom, 20) } .frame(width: 380, height: 520) - .ignoresSafeArea() } }