update aboutView

This commit is contained in:
True Zhuanjia committed 2026-06-14 14:17:07 +08:00
1 parent 286b5e94e6
commit f039f5af29
3 files changed
+105 -30

No files matched your search

+22 -3
View File
@@ -67,11 +67,29 @@ public struct AboutView: View {
.lineLimit(nil) .lineLimit(nil)
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
// 链接按钮 // 链接按钮
if #available(iOS 14.0, *) { if #available(iOS 14.0, *) {
Link(LocalizationHelper.localizedString(forKey: "Learn more & join us"), destination: URL(string: LocalizationHelper.localizedString(forKey: "supportLink"))!)
.padding(.top, 10) HStack(spacing: 20) {
Spacer() 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 按钮 // OK 按钮
Button(LocalizationHelper.localizedString(forKey: "OK")) { Button(LocalizationHelper.localizedString(forKey: "OK")) {
aboutVC.dismiss(animated:true) aboutVC.dismiss(animated:true)
@@ -81,6 +99,7 @@ public struct AboutView: View {
.foregroundColor(.white) .foregroundColor(.white)
.frame(height: 46) .frame(height: 46)
.cornerRadius(12) .cornerRadius(12)
.padding(.top, 10)
} else { } else {
HStack(spacing: 20) { HStack(spacing: 20) {
Button(LocalizationHelper.localizedString(forKey: "Join us")) { Button(LocalizationHelper.localizedString(forKey: "Join us")) {
-2
View File
@@ -28,10 +28,8 @@ import SwiftUI
hostingVC.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), hostingVC.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
]) ])
// 🎯 设置弹窗大小
preferredContentSize = CGSize(width: 530, height: 430) preferredContentSize = CGSize(width: 530, height: 430)
// ⚠️ 一定要设置以下样式才会生效 preferredContentSize
modalPresentationStyle = .formSheet 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 " : { "Component size: %.2f " : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "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" : { "Keyboard / Mouse" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "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" : { "Learn More" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@@ -9581,36 +9662,13 @@
"zh-Hant" : { "zh-Hant" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "了解更多" "value" : "瞭解更多"
} }
}, },
"zh-HK" : { "zh-HK" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "了解更多" "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" : "瞭解並加入社群"
} }
} }
} }