feat: 订阅样式

This commit is contained in:
jinyaqiu 2025-09-02 09:44:20 +08:00
parent 8d5d69fb4a
commit ac5d7d11cc
3 changed files with 30 additions and 10 deletions

View File

@ -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]

View File

@ -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)
}

View File

@ -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)