ソースを参照

Refine paywall footer layout and free-plan action.

Replace legal links with an evenly spaced light footer, move it to the bottom of the paywall content area, remove the close button, and route Continue with free plan back to the home screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 1 ヶ月 前
コミット
d0300708ea
1 ファイル変更21 行追加35 行削除
  1. 21 35
      gramora/Views/PaywallView.swift

+ 21 - 35
gramora/Views/PaywallView.swift

@@ -15,30 +15,17 @@ struct PaywallView: View {
             let scale = min(1, availableWidth / baseWidth, availableHeight / totalBaseHeight)
 
             VStack(spacing: 0) {
-                HStack {
-                    Button(action: onClose) {
-                        Image(systemName: "xmark")
-                            .font(.system(size: 14, weight: .semibold))
-                            .foregroundStyle(Color(red: 0.58, green: 0.61, blue: 0.66))
-                            .padding(8)
-                    }
-                    .buttonStyle(.plain)
-
-                    Spacer()
-                }
-                .padding(.horizontal, 20)
-                .padding(.top, 8)
-
                 VStack(spacing: 18) {
                     titleSection
                     featuresSection
                     plansSection
                     ctaSection
+                    Spacer(minLength: 0)
                     legalSection
                 }
                 .frame(width: baseWidth, height: baseContentHeight, alignment: .top)
                 .scaleEffect(scale, anchor: .top)
-                .padding(.top, -8)
+                .padding(.top, 10)
 
                 Spacer(minLength: 0)
             }
@@ -124,38 +111,37 @@ struct PaywallView: View {
     }
 
     private var legalSection: some View {
-        VStack(spacing: 10) {
+        VStack(spacing: 12) {
             Text("Your subscription will automatically renew unless auto-renew is turned off at least 24-hours before the end of the current subscription period.\nPayment will be charged to your iTunes account at confirmation of purchase.")
                 .font(.system(size: 12, weight: .medium))
                 .foregroundStyle(Color(red: 0.59, green: 0.62, blue: 0.68))
                 .multilineTextAlignment(.center)
                 .lineSpacing(2)
 
-            HStack(spacing: 18) {
-                legalLink("Privacy Policy")
-                legalDivider
-                legalLink("Terms of Use")
-                legalDivider
-                legalLink("Restore Purchases")
-                legalDivider
-                legalLink("EULA")
+            HStack(spacing: 0) {
+                footerLink("Continue with free plan", action: onClose)
+                footerLink("Privacy Policy")
+                footerLink("Support")
+                footerLink("Terms of Services")
             }
-            .padding(.bottom, 6)
+            .frame(height: 44)
+            .frame(maxWidth: .infinity)
+            .background(Color.white)
+            .clipShape(RoundedRectangle(cornerRadius: 0))
         }
     }
 
-    private var legalDivider: some View {
-        RoundedRectangle(cornerRadius: 1)
-            .fill(Color(red: 0.84, green: 0.86, blue: 0.89))
-            .frame(width: 1, height: 16)
-    }
-
-    private func legalLink(_ title: String) -> some View {
-        Button(action: {}) {
+    private func footerLink(_ title: String, action: @escaping () -> Void = {}) -> some View {
+        Button(action: action) {
             Text(title)
-                .font(.system(size: 13, weight: .semibold))
-                .foregroundStyle(Color(red: 0.07, green: 0.60, blue: 0.46))
+                .font(.system(size: 14, weight: .semibold))
+                .foregroundStyle(Color(red: 0.59, green: 0.62, blue: 0.68))
+                .lineLimit(1)
+                .minimumScaleFactor(0.75)
+                .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
+                .contentShape(Rectangle())
         }
+        .frame(maxWidth: .infinity, maxHeight: .infinity)
         .buttonStyle(.plain)
     }
 }