Kaynağa Gözat

Refine paywall footer styling and spacing to match legal text.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 1 ay önce
ebeveyn
işleme
2468ad26f9
1 değiştirilmiş dosya ile 12 ekleme ve 6 silme
  1. 12 6
      gramora/Views/PaywallView.swift

+ 12 - 6
gramora/Views/PaywallView.swift

@@ -204,32 +204,37 @@ struct PaywallView: View {
                 Text("Your subscription will automatically renew unless auto-renew is turned off at least 24-hours before the end of the current subscription period.")
                 Text("Your subscription will automatically renew unless auto-renew is turned off at least 24-hours before the end of the current subscription period.")
                 Text("Payment will be charged to your iTunes account at confirmation of purchase.")
                 Text("Payment will be charged to your iTunes account at confirmation of purchase.")
             }
             }
+            .padding(.top, -8)
             .font(.system(size: 12, weight: .medium))
             .font(.system(size: 12, weight: .medium))
             .foregroundStyle(Color(red: 0.59, green: 0.62, blue: 0.68))
             .foregroundStyle(Color(red: 0.59, green: 0.62, blue: 0.68))
             .multilineTextAlignment(.center)
             .multilineTextAlignment(.center)
 
 
-            HStack(spacing: 0) {
+            HStack {
                 PaywallFooterLinkView(
                 PaywallFooterLinkView(
                     title: isPremium ? "Manage Subscription" : "Continue with free plan",
                     title: isPremium ? "Manage Subscription" : "Continue with free plan",
                     action: isPremium ? subscriptions.openSubscriptionManagement : onClose
                     action: isPremium ? subscriptions.openSubscriptionManagement : onClose
                 )
                 )
+                Spacer(minLength: 0)
                 PaywallFooterLinkView(title: "Restore Purchase") {
                 PaywallFooterLinkView(title: "Restore Purchase") {
                     Task {
                     Task {
                         await subscriptions.restorePurchases()
                         await subscriptions.restorePurchases()
                     }
                     }
                 }
                 }
+                Spacer(minLength: 0)
                 PaywallFooterLinkView(title: "Privacy") {
                 PaywallFooterLinkView(title: "Privacy") {
                     AppLinks.open(AppLinks.privacy)
                     AppLinks.open(AppLinks.privacy)
                 }
                 }
+                Spacer(minLength: 0)
                 PaywallFooterLinkView(title: "Terms and Conditions") {
                 PaywallFooterLinkView(title: "Terms and Conditions") {
                     AppLinks.open(AppLinks.terms)
                     AppLinks.open(AppLinks.terms)
                 }
                 }
+                Spacer(minLength: 0)
                 PaywallFooterLinkView(title: "Support") {
                 PaywallFooterLinkView(title: "Support") {
                     AppLinks.open(AppLinks.support)
                     AppLinks.open(AppLinks.support)
                 }
                 }
             }
             }
-            .frame(height: 44)
             .frame(maxWidth: .infinity)
             .frame(maxWidth: .infinity)
+            .padding(.top, 8)
         }
         }
     }
     }
 
 
@@ -422,17 +427,18 @@ private struct PaywallFooterLinkView: View {
         self.action = action
         self.action = action
     }
     }
 
 
+    private static let linkColor = Color(red: 0.59, green: 0.62, blue: 0.68)
+    private static let linkHoverColor = Color(red: 0.47, green: 0.51, blue: 0.57)
+
     var body: some View {
     var body: some View {
         Button(action: action) {
         Button(action: action) {
             Text(title)
             Text(title)
-                .font(.system(size: 14, weight: .semibold))
-                .foregroundStyle(isHovered ? AppTheme.teal : AppTheme.textMuted)
+                .font(.system(size: 12, weight: .medium))
+                .foregroundStyle(isHovered ? Self.linkHoverColor : Self.linkColor)
                 .lineLimit(1)
                 .lineLimit(1)
                 .minimumScaleFactor(0.75)
                 .minimumScaleFactor(0.75)
-                .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
                 .contentShape(Rectangle())
                 .contentShape(Rectangle())
         }
         }
-        .frame(maxWidth: .infinity, maxHeight: .infinity)
         .animation(.easeOut(duration: 0.15), value: isHovered)
         .animation(.easeOut(duration: 0.15), value: isHovered)
         .buttonStyle(.plain)
         .buttonStyle(.plain)
         .onHover { isHovered = $0 }
         .onHover { isHovered = $0 }