about page content udpate
This commit is contained in:
1 parent
48fbec02e4
commit
12ad168e13
3 files changed
+25
-5
No files matched your search
@@ -14,11 +14,11 @@ public struct AboutView: View {
|
|||||||
@Environment(\.presentationMode) var presentationMode
|
@Environment(\.presentationMode) var presentationMode
|
||||||
|
|
||||||
public var body: some View {
|
public var body: some View {
|
||||||
VStack(spacing: 20) {
|
VStack(spacing: 10) {
|
||||||
// App 图标
|
// App 图标
|
||||||
Image(uiImage: UIImage(named: "AppIconMedium") ?? UIImage())
|
Image(uiImage: UIImage(named: "AppIconMedium") ?? UIImage())
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 100, height: 100)
|
.frame(width: 80, height: 80)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 36))
|
.clipShape(RoundedRectangle(cornerRadius: 36))
|
||||||
|
|
||||||
// App 名称
|
// App 名称
|
||||||
@@ -35,11 +35,25 @@ public struct AboutView: View {
|
|||||||
|
|
||||||
// 说明文字
|
// 说明文字
|
||||||
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(.leading)
|
.multilineTextAlignment(.center)
|
||||||
.lineLimit(nil)
|
.lineLimit(nil)
|
||||||
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
|
.frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行
|
||||||
.padding()
|
|
||||||
|
|
||||||
|
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: "https://example.com")!)
|
Link(SwiftLocalizationHelper.localizedString(forKey: "Join us"), destination: URL(string: "https://example.com")!)
|
||||||
|
|||||||
@@ -29,9 +29,13 @@ import SwiftUI
|
|||||||
|
|
||||||
// 🎯 设置弹窗大小
|
// 🎯 设置弹窗大小
|
||||||
preferredContentSize = CGSize(width: 600, height: 450)
|
preferredContentSize = CGSize(width: 600, height: 450)
|
||||||
|
//preferredContentSize = CGSize(width:150, height:120 )
|
||||||
|
|
||||||
// ⚠️ 一定要设置以下样式才会生效 preferredContentSize
|
// ⚠️ 一定要设置以下样式才会生效 preferredContentSize
|
||||||
modalPresentationStyle = .formSheet
|
modalPresentationStyle = .formSheet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isIPhone() -> Bool {
|
||||||
|
return UIDevice.current.userInterfaceIdiom == .phone
|
||||||
|
}
|
||||||
@@ -4521,8 +4521,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司" : {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version" : "1.0"
|
"version" : "1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user