update aboutView

This commit is contained in:
True Zhuanjia
2026-02-14 02:07:28 +08:00
parent 04845df09c
commit 28d9a0faf2
4 changed files with 78 additions and 44 deletions
+23 -13
View File
@@ -16,12 +16,12 @@ public struct AboutView: View {
public var aboutVC:UIViewController
public var body: some View {
VStack(spacing: 10) {
VStack(spacing: 7) {
// App 图标
Image(uiImage: UIImage(named: "AppIconMedium") ?? UIImage())
// .resizable()
.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))
// App 名称
@@ -35,31 +35,41 @@ public struct AboutView: View {
.font(.subheadline)
.foregroundColor(.gray)
}
// 说明文字
Text(SwiftLocalizationHelper.localizedString(forKey: "From the player community, to the player community."))
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
if Locale.preferredLanguages.first!.hasPrefix("zh-Hans") {
if #available(iOS 14.0, *) {
Text("闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司").font(.caption2)
Text("闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司").font(.caption2)
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
.padding()
//.padding()
} else {
Text("闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司").font(.caption)
Text("闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司").font(.caption)
.multilineTextAlignment(.center)
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
.padding()
//.padding()
}
}
// 说明文字
Text(SwiftLocalizationHelper.localizedString(forKey: "From the player community, to the player community."))
.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)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
// 链接按钮
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)
Spacer()
// OK 按钮
+1 -1
View File
@@ -29,7 +29,7 @@ import SwiftUI
])
// 🎯 设置弹窗大小
preferredContentSize = CGSize(width: 530, height: 450)
preferredContentSize = CGSize(width: 530, height: 430)
// ⚠️ 一定要设置以下样式才会生效 preferredContentSize
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" : {
"extractionState" : "manual",
"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" : {
"extractionState" : "manual",
"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..." : {
"extractionState" : "manual",
"localizations" : {
@@ -8775,7 +8798,7 @@
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"state" : "translated",
"value" : "开发者: True砖家 (B站)"
}
},
@@ -8920,7 +8943,7 @@
}
}
},
"闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司" : {
"闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司" : {
}
},
@@ -1347,11 +1347,12 @@ static NSMutableSet* hostList;
}
}
- (BOOL)isFirstLaunch {
NSString *key = @"appHasLaunchedBefore";
BOOL launchedBefore = [[NSUserDefaults standardUserDefaults] boolForKey:key];
- (BOOL)needPopupAboutView {
// NSString *key = @"appHasLaunchedBefore";
NSString *key = @"needPopupAboutView20260215";
BOOL keyExists = [[NSUserDefaults standardUserDefaults] boolForKey:key];
if (!launchedBefore) {
if (!keyExists) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:key];
[[NSUserDefaults standardUserDefaults] synchronize]; // iOS 12+ 可省略
return YES;
@@ -1964,7 +1965,7 @@ static NSMutableSet* hostList;
//[self simulateSettingsButtonPress]; //force reload resolution table in the setting
//[self simulateSettingsButtonPress];
[self updateResolutionAccordingly];
if([self isFirstLaunch])[self helpButtonTapped];
if([self needPopupAboutView])[self helpButtonTapped];
}
- (void)viewWillDisappear:(BOOL)animated{