feat: 订阅样式
This commit is contained in:
parent
8d5d69fb4a
commit
ac5d7d11cc
@ -13,7 +13,7 @@ struct SVGImage: UIViewRepresentable {
|
||||
private func createImageView() -> SVGKFastImageView {
|
||||
let emptySVGString = """
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1" preserveAspectRatio="xMidYMid meet">
|
||||
<rect width="1" height="1" fill="red" opacity="0.5"/>
|
||||
<rect width="1" height="1" fill="transparent"/>
|
||||
</svg>
|
||||
"""
|
||||
|
||||
@ -21,10 +21,13 @@ struct SVGImage: UIViewRepresentable {
|
||||
let svgImage = SVGKImage(data: data) {
|
||||
let imageView = SVGKFastImageView(svgkImage: svgImage) ?? SVGKFastImageView()
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.backgroundColor = .clear
|
||||
return imageView
|
||||
}
|
||||
|
||||
return SVGKFastImageView()
|
||||
let fallbackView = SVGKFastImageView()
|
||||
fallbackView.backgroundColor = .clear
|
||||
return fallbackView
|
||||
}
|
||||
|
||||
func makeUIView(context: Context) -> SVGKFastImageView {
|
||||
@ -69,6 +72,7 @@ struct SVGImage: UIViewRepresentable {
|
||||
imageView.contentMode = contentMode == .fit ? .scaleAspectFit : .scaleAspectFill
|
||||
imageView.clipsToBounds = true
|
||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView.backgroundColor = .clear
|
||||
|
||||
// 确保图片视图可以正确缩放
|
||||
imageView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
|
||||
@ -32,8 +32,8 @@ struct CreditsInfoCard: View {
|
||||
mainCreditsSection
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.background(Theme.Colors.primaryLight)
|
||||
.cornerRadius(Theme.CornerRadius.extraLarge)
|
||||
.background(Color.themeTextWhite)
|
||||
.cornerRadius(Theme.CornerRadius.round)
|
||||
// .shadow(color: Theme.Shadows.small, radius: Theme.Shadows.cardShadow.radius, x: Theme.Shadows.cardShadow.x, y: Theme.Shadows.cardShadow.y)
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,6 @@ struct SubscribeView: View {
|
||||
dismiss()
|
||||
}
|
||||
.background(Color.themeTextWhiteSecondary)
|
||||
.padding(.bottom, Theme.Spacing.lg)
|
||||
|
||||
ScrollView {
|
||||
VStack(spacing: 0) {
|
||||
@ -232,6 +231,9 @@ struct SubscribeView: View {
|
||||
HStack(spacing: 8) {
|
||||
Button(action: {
|
||||
// 打开服务条款
|
||||
if let url = URL(string: "https://memorywake.com/privacy-policy") {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}) {
|
||||
Text("Terms of Service")
|
||||
.underline()
|
||||
@ -242,6 +244,9 @@ struct SubscribeView: View {
|
||||
|
||||
Button(action: {
|
||||
// 打开隐私政策
|
||||
if let url = URL(string: "https://memorywake.com/privacy-policy") {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}) {
|
||||
Text("Privacy Policy")
|
||||
.underline()
|
||||
@ -250,13 +255,24 @@ struct SubscribeView: View {
|
||||
Text("|")
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
// Button(action: {
|
||||
// Task { await store.restorePurchases() }
|
||||
// }) {
|
||||
// Text("Restore Purchase")
|
||||
// .underline()
|
||||
// }
|
||||
Button(action: {
|
||||
Task { await store.restorePurchases() }
|
||||
}) {
|
||||
Text("Restore Purchase")
|
||||
.underline()
|
||||
// 打开隐私政策
|
||||
if let url = URL(string: "https://memorywake.com/privacy-policy") {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}) {
|
||||
Text("AI Usage Guidelines")
|
||||
.underline()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.font(Typography.font(for: .caption, family: .quicksandRegular))
|
||||
.foregroundColor(.secondary)
|
||||
.padding(.top, Theme.Spacing.sm)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user