update aboutView

This commit is contained in:
True Zhuanjia committed 2026-02-14 02:07:28 +08:00
1 parent 04845df09c
commit 28d9a0faf2
4 files changed
+83 -49

No files matched your search

+28 -18
View File
@@ -16,12 +16,12 @@ public struct AboutView: View {
public var aboutVC:UIViewController public var aboutVC:UIViewController
public var body: some View { public var body: some View {
VStack(spacing: 10) { VStack(spacing: 7) {
// App 图标 // App 图标
Image(uiImage: UIImage(named: "AppIconMedium") ?? UIImage()) Image(uiImage: UIImage(named: "AppIconMedium") ?? UIImage())
// .resizable() // .resizable()
.resizable(capInsets:EdgeInsets(top: 3.5, leading: 3.5, bottom: 3.5, trailing: 3.5)) .resizable(capInsets:EdgeInsets(top: 3.5, leading: 3.5, bottom: 3.5, trailing: 3.5))
.frame(width: 100, height: 100) .frame(width: 90, height: 90)
.clipShape(RoundedRectangle(cornerRadius: 28)) .clipShape(RoundedRectangle(cornerRadius: 28))
// App 名称 // App 名称
@@ -36,30 +36,40 @@ public struct AboutView: View {
.foregroundColor(.gray) .foregroundColor(.gray)
} }
if Locale.preferredLanguages.first!.hasPrefix("zh-Hans") {
if #available(iOS 14.0, *) {
Text("闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司").font(.caption2)
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
//.padding()
} else {
Text("闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司").font(.caption)
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
//.padding()
}
}
// 说明文字 // 说明文字
Text(SwiftLocalizationHelper.localizedString(forKey: "From the player community, to the player community.")) Text(SwiftLocalizationHelper.localizedString(forKey: "From the player community, to the player community."))
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.font(Font.caption.italic())
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
.padding()
Text(SwiftLocalizationHelper.localizedString(forKey: "VoidLink has better performance now!"))
.multilineTextAlignment(.center)
.font(Font.callout.bold())
.lineLimit(nil) .lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
if Locale.preferredLanguages.first!.hasPrefix("zh-Hans") {
if #available(iOS 14.0, *) {
Text("闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司").font(.caption2)
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
.padding()
} else {
Text("闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司").font(.caption)
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
.padding()
}
}
// 链接按钮 // 链接按钮
if #available(iOS 14.0, *) { if #available(iOS 14.0, *) {
Link(SwiftLocalizationHelper.localizedString(forKey: "Join us"), destination: URL(string: SwiftLocalizationHelper.localizedString(forKey: "supportLink"))!) Link(SwiftLocalizationHelper.localizedString(forKey: "Learn more & join us"), destination: URL(string: SwiftLocalizationHelper.localizedString(forKey: "supportLink"))!)
.padding(.top, 10) .padding(.top, 10)
Spacer() Spacer()
// OK 按钮 // OK 按钮
+1 -1
View File
@@ -29,7 +29,7 @@ import SwiftUI
]) ])
// 🎯 设置弹窗大小 // 🎯 设置弹窗大小
preferredContentSize = CGSize(width: 530, height: 450) preferredContentSize = CGSize(width: 530, height: 430)
// ⚠️ 一定要设置以下样式才会生效 preferredContentSize // ⚠️ 一定要设置以下样式才会生效 preferredContentSize
modalPresentationStyle = .formSheet modalPresentationStyle = .formSheet
+48 -25
View File
@@ -4118,29 +4118,6 @@
} }
} }
}, },
"Join us" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "加入我们"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "加入我們"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "加入我們"
}
}
}
},
"Label alpha: %.2f" : { "Label alpha: %.2f" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@@ -4279,6 +4256,29 @@
} }
} }
}, },
"Learn more & join us" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "了解并加入社区"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "瞭解並加入社群"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "瞭解並加入社群"
}
}
}
},
"left" : { "left" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@@ -8695,6 +8695,29 @@
} }
} }
}, },
"VoidLink has better performance now!" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "VoidLink现已具备更强性能!"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "VoidLink現已具備更強效能!"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "VoidLink現已具備更強效能!"
}
}
}
},
"Waiting for controller..." : { "Waiting for controller..." : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@@ -8775,7 +8798,7 @@
}, },
"zh-Hans" : { "zh-Hans" : {
"stringUnit" : { "stringUnit" : {
"state" : "needs_review", "state" : "translated",
"value" : "开发者: True砖家 (B站)" "value" : "开发者: True砖家 (B站)"
} }
}, },
@@ -8920,7 +8943,7 @@
} }
} }
}, },
"闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司" : { "闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司" : {
} }
}, },
@@ -1347,11 +1347,12 @@ static NSMutableSet* hostList;
} }
} }
- (BOOL)isFirstLaunch { - (BOOL)needPopupAboutView {
NSString *key = @"appHasLaunchedBefore"; // NSString *key = @"appHasLaunchedBefore";
BOOL launchedBefore = [[NSUserDefaults standardUserDefaults] boolForKey:key]; NSString *key = @"needPopupAboutView20260215";
BOOL keyExists = [[NSUserDefaults standardUserDefaults] boolForKey:key];
if (!launchedBefore) { if (!keyExists) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:key]; [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key];
[[NSUserDefaults standardUserDefaults] synchronize]; // iOS 12+ 可省略 [[NSUserDefaults standardUserDefaults] synchronize]; // iOS 12+ 可省略
return YES; return YES;
@@ -1964,7 +1965,7 @@ static NSMutableSet* hostList;
//[self simulateSettingsButtonPress]; //force reload resolution table in the setting //[self simulateSettingsButtonPress]; //force reload resolution table in the setting
//[self simulateSettingsButtonPress]; //[self simulateSettingsButtonPress];
[self updateResolutionAccordingly]; [self updateResolutionAccordingly];
if([self isFirstLaunch])[self helpButtonTapped]; if([self needPopupAboutView])[self helpButtonTapped];
} }
- (void)viewWillDisappear:(BOOL)animated{ - (void)viewWillDisappear:(BOOL)animated{