feat: 添加SVGKit依赖并优化登录流程和UI样式
This commit is contained in:
parent
c5a314f72b
commit
23850ef24e
@ -7,6 +7,8 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
0DE4253B2E78470700B519F0 /* SVGKit in Frameworks */ = {isa = PBXBuildFile; productRef = AB6693C92E65C94400BCAAC1 /* SVGKit */; };
|
||||||
|
0DE4253C2E78470700B519F0 /* SVGKitSwift in Frameworks */ = {isa = PBXBuildFile; productRef = AB6693CB2E65C94400BCAAC1 /* SVGKitSwift */; };
|
||||||
AB6695272E67015600BCAAC1 /* WaterfallGrid in Frameworks */ = {isa = PBXBuildFile; productRef = AB6695262E67015600BCAAC1 /* WaterfallGrid */; };
|
AB6695272E67015600BCAAC1 /* WaterfallGrid in Frameworks */ = {isa = PBXBuildFile; productRef = AB6695262E67015600BCAAC1 /* WaterfallGrid */; };
|
||||||
AB8773632E4E04400071CB53 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = AB8773622E4E040E0071CB53 /* .gitignore */; };
|
AB8773632E4E04400071CB53 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = AB8773622E4E040E0071CB53 /* .gitignore */; };
|
||||||
ABC150C12E5DB39A00A1F970 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = ABC150C02E5DB39A00A1F970 /* Lottie */; };
|
ABC150C12E5DB39A00A1F970 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = ABC150C02E5DB39A00A1F970 /* Lottie */; };
|
||||||
@ -76,6 +78,8 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
0DE4253C2E78470700B519F0 /* SVGKitSwift in Frameworks */,
|
||||||
|
0DE4253B2E78470700B519F0 /* SVGKit in Frameworks */,
|
||||||
ABE8998E2E533A7100CD7BA6 /* Alamofire in Frameworks */,
|
ABE8998E2E533A7100CD7BA6 /* Alamofire in Frameworks */,
|
||||||
AB6695272E67015600BCAAC1 /* WaterfallGrid in Frameworks */,
|
AB6695272E67015600BCAAC1 /* WaterfallGrid in Frameworks */,
|
||||||
ABC150C12E5DB39A00A1F970 /* Lottie in Frameworks */,
|
ABC150C12E5DB39A00A1F970 /* Lottie in Frameworks */,
|
||||||
|
|||||||
@ -125,6 +125,8 @@ struct BlindOutcomeView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationBarHidden(true)
|
.navigationBarHidden(true)
|
||||||
|
|
||||||
|
|
||||||
.navigationBarBackButtonHidden(true)
|
.navigationBarBackButtonHidden(true)
|
||||||
.overlay(
|
.overlay(
|
||||||
JoinModal(isPresented: $showIPListModal, onClose: { onContinue() })
|
JoinModal(isPresented: $showIPListModal, onClose: { onContinue() })
|
||||||
|
|||||||
@ -72,7 +72,9 @@ struct LoginView: View {
|
|||||||
let nonce = String.randomURLSafeString(length: 32)
|
let nonce = String.randomURLSafeString(length: 32)
|
||||||
self.currentNonce = nonce
|
self.currentNonce = nonce
|
||||||
request.nonce = self.sha256(nonce)
|
request.nonce = self.sha256(nonce)
|
||||||
request.requestedScopes = [.fullName, .email]
|
// 不请求任何可识别个人信息的范围,遵循最小化数据收集原则
|
||||||
|
// 若业务未来确有需要,可根据功能在提交审核前按需开启
|
||||||
|
// request.requestedScopes = [.fullName, .email]
|
||||||
print(" 登录请求配置完成,nonce 已设置")
|
print(" 登录请求配置完成,nonce 已设置")
|
||||||
} onCompletion: { result in
|
} onCompletion: { result in
|
||||||
print(" 收到 Apple 登录回调")
|
print(" 收到 Apple 登录回调")
|
||||||
|
|||||||
@ -131,11 +131,11 @@ struct AccountView: View {
|
|||||||
|
|
||||||
}) {
|
}) {
|
||||||
Text("Confirm")
|
Text("Confirm")
|
||||||
.foregroundColor(.themeTextWhite)
|
.foregroundColor(.white)
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.padding()
|
.padding()
|
||||||
.background(Color.themeTextWhiteSecondary)
|
.background(Color.gray)
|
||||||
.cornerRadius(32)
|
.cornerRadius(32)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,15 +46,10 @@ struct WakeApp: App {
|
|||||||
if authState.isAuthenticated {
|
if authState.isAuthenticated {
|
||||||
// 已登录:显示主页面
|
// 已登录:显示主页面
|
||||||
NavigationStack(path: $router.path) {
|
NavigationStack(path: $router.path) {
|
||||||
// FIXME 调回来
|
|
||||||
BlindBoxView(mediaType: .all)
|
BlindBoxView(mediaType: .all)
|
||||||
.navigationDestination(for: AppRoute.self) { route in
|
.navigationDestination(for: AppRoute.self) { route in
|
||||||
route.view
|
route.view
|
||||||
}
|
}
|
||||||
// UserInfo()
|
|
||||||
// .navigationDestination(for: AppRoute.self) { route in
|
|
||||||
// route.view
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 未登录:显示登录界面
|
// 未登录:显示登录界面
|
||||||
@ -104,10 +99,13 @@ struct WakeApp: App {
|
|||||||
// 检查token是否有效
|
// 检查token是否有效
|
||||||
if TokenManager.shared.isTokenValid(token) {
|
if TokenManager.shared.isTokenValid(token) {
|
||||||
authState.isAuthenticated = true
|
authState.isAuthenticated = true
|
||||||
|
} else {
|
||||||
|
// 跳转到登录页面
|
||||||
|
authState.isAuthenticated = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2秒后自动隐藏启动页
|
// 自动隐藏启动页
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
DispatchQueue.main.asyncAfter(deadline: .now()) {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
showSplash = false
|
showSplash = false
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user