update aboutView

This commit is contained in:
True Zhuanjia
2026-06-14 14:17:07 +08:00
parent 286b5e94e6
commit f039f5af29
3 changed files with 105 additions and 30 deletions
+22 -3
View File
@@ -66,12 +66,30 @@ public struct AboutView: View {
.font(Font.callout.bold())
.lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
// 链接按钮
if #available(iOS 14.0, *) {
Link(LocalizationHelper.localizedString(forKey: "Learn more & join us"), destination: URL(string: LocalizationHelper.localizedString(forKey: "supportLink"))!)
.padding(.top, 10)
Spacer()
HStack(spacing: 20) {
Link(LocalizationHelper.localizedString(forKey: "Learn more"), destination: URL(string: LocalizationHelper.localizedString(forKey: "supportLink"))!)
if #available(iOS 16, *) {
let languageCode = Locale.current.language.languageCode?.identifier
if languageCode == "zh" {
Link(LocalizationHelper.localizedString(forKey: "加入QQ群"), destination: URL(string: LocalizationHelper.localizedString(forKey: "https://qm.qq.com/q/uM51CYWLS2"))!)
}
}
if GenericUtils.isIPhone() {
Link(LocalizationHelper.localizedString(forKey: "joinCommunity"), destination: URL(string: LocalizationHelper.localizedString(forKey: "communityLink"))!)
}
}
.padding(.top, 10)
if !GenericUtils.isIPhone() {
Link(LocalizationHelper.localizedString(forKey: "joinCommunity"), destination: URL(string: LocalizationHelper.localizedString(forKey: "communityLink"))!)
}
// OK 按钮
Button(LocalizationHelper.localizedString(forKey: "OK")) {
aboutVC.dismiss(animated:true)
@@ -81,6 +99,7 @@ public struct AboutView: View {
.foregroundColor(.white)
.frame(height: 46)
.cornerRadius(12)
.padding(.top, 10)
} else {
HStack(spacing: 20) {
Button(LocalizationHelper.localizedString(forKey: "Join us")) {
-2
View File
@@ -28,10 +28,8 @@ import SwiftUI
hostingVC.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
])
// 🎯 设置弹窗大小
preferredContentSize = CGSize(width: 530, height: 430)
// ⚠️ 一定要设置以下样式才会生效 preferredContentSize
modalPresentationStyle = .formSheet
}
}
+83 -25
View File
@@ -5327,6 +5327,35 @@
}
}
},
"communityLink" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "https://discord.com/invite/Wkj9Az9UmZ"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "https://space.bilibili.com/329885323"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "https://discord.com/invite/Wkj9Az9UmZ"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "https://discord.com/invite/Wkj9Az9UmZ"
}
}
}
},
"Component size: %.2f " : {
"extractionState" : "manual",
"localizations" : {
@@ -9252,6 +9281,35 @@
}
}
},
"joinCommunity" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Join our Discord"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "开发者动态 True砖家@Bilibili"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "加入Discord社群"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "加入Discord社群"
}
}
}
},
"Keyboard / Mouse" : {
"extractionState" : "manual",
"localizations" : {
@@ -9569,6 +9627,29 @@
}
}
},
"Learn more" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "了解更多"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "瞭解更多"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "瞭解更多"
}
}
}
},
"Learn More" : {
"extractionState" : "manual",
"localizations" : {
@@ -9581,36 +9662,13 @@
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "了解更多"
"value" : "瞭解更多"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "了解更多"
}
}
}
},
"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" : "瞭解並加入社群"
"value" : "瞭解更多"
}
}
}