浏览代码

Update paywall header and right panel layout.

Remove the top restore action, overlay the top bar, and adjust right panel spacing and heading typography.

Co-authored-by: Cursor <cursoragent@cursor.com>
huzaifahayat12 2 月之前
父节点
当前提交
81d07ce415
共有 1 个文件被更改,包括 10 次插入31 次删除
  1. 10 31
      google_apps/PremiumFeaturesView.swift

+ 10 - 31
google_apps/PremiumFeaturesView.swift

@@ -70,11 +70,7 @@ struct PremiumFeaturesView: View {
 
             GeometryReader { geo in
                 let useWideLayout = geo.size.width >= PremiumPaywallMetrics.wideLayoutMinWidth
-                VStack(spacing: 0) {
-                    paywallTopBar
-                        .padding(.horizontal, useWideLayout ? 22 : 16)
-                        .padding(.vertical, 12)
-
+                ZStack(alignment: .top) {
                     if useWideLayout {
                         desktopSplitContent
                             .frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -82,6 +78,10 @@ struct PremiumFeaturesView: View {
                         compactScrollContent
                             .frame(maxWidth: .infinity, maxHeight: .infinity)
                     }
+
+                    paywallTopBar
+                        .padding(.horizontal, useWideLayout ? 22 : 16)
+                        .padding(.vertical, 12)
                 }
             }
         }
@@ -144,33 +144,12 @@ struct PremiumFeaturesView: View {
             .buttonStyle(.plain)
 
             Spacer()
-
-            Button {
-                Task { await premiumStore.restorePurchases() }
-            } label: {
-                HStack(spacing: 6) {
-                    if premiumStore.restoreInProgress {
-                        ProgressView()
-                            .controlSize(.mini)
-                    }
-                    Text(premiumStore.restoreInProgress ? "Restoring…" : "Restore")
-                        .font(.system(size: 12, weight: .semibold))
-                }
-                .foregroundStyle(primaryTextColor)
-                .padding(.horizontal, 11)
-                .padding(.vertical, 5)
-                .background(
-                    RoundedRectangle(cornerRadius: 8, style: .continuous)
-                        .fill(chipFillColor)
-                )
-            }
-            .buttonStyle(.plain)
-            .disabled(premiumStore.purchaseInProgress || premiumStore.restoreInProgress)
         }
     }
 
     private var desktopSplitContent: some View {
-        HStack(alignment: .top, spacing: 0) {
+        let contentTopInset: CGFloat = 44
+        return HStack(alignment: .top, spacing: 0) {
             VStack(spacing: 0) {
                 ScrollView {
                     VStack(alignment: .leading, spacing: 18) {
@@ -183,7 +162,7 @@ struct PremiumFeaturesView: View {
                     }
                     .padding(.leading, 22)
                     .padding(.trailing, 14)
-                    .padding(.top, 2)
+                    .padding(.top, contentTopInset + 2)
                     .padding(.bottom, 18)
                 }
                 .frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -206,7 +185,7 @@ struct PremiumFeaturesView: View {
 
                 VStack(alignment: .leading, spacing: 18) {
                     Text("Choose a plan")
-                        .font(.system(size: 15, weight: .semibold))
+                        .font(.system(size: 20, weight: .bold))
                         .foregroundStyle(primaryTextColor)
 
                     planCardsStack(compactPricing: false)
@@ -215,7 +194,7 @@ struct PremiumFeaturesView: View {
                 }
                 .padding(.leading, 18)
                 .padding(.trailing, 22)
-                .padding(.top, 14)
+                .padding(.top, contentTopInset + 14)
                 .padding(.bottom, 22)
             }
             .frame(width: 288)