Bladeren bron

Open Join Meetings actions to all users.

Remove premium gating from instant meet and join-by-link interactions so non-premium users can use the full Join Meetings flow with normal interactive UI states.

Made-with: Cursor
huzaifahayat12 1 week geleden
bovenliggende
commit
19cd61d198
1 gewijzigde bestanden met toevoegingen van 13 en 37 verwijderingen
  1. 13 37
      meetings_app/ViewController.swift

+ 13 - 37
meetings_app/ViewController.swift

@@ -510,10 +510,6 @@ private extension ViewController {
510 510
     }
511 511
 
512 512
     @objc private func joinMeetClicked(_ sender: Any?) {
513
-        guard storeKitCoordinator.hasPremiumAccess else {
514
-            showPaywall()
515
-            return
516
-        }
517 513
         let rawInput = meetLinkField?.stringValue.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
518 514
 
519 515
         guard let url = normalizedMeetJoinURL(from: rawInput) else {
@@ -528,10 +524,6 @@ private extension ViewController {
528 524
     }
529 525
 
530 526
     @objc private func joinWithLinkCardClicked(_ sender: NSClickGestureRecognizer) {
531
-        guard storeKitCoordinator.hasPremiumAccess else {
532
-            showPaywall()
533
-            return
534
-        }
535 527
         meetLinkField?.window?.makeFirstResponder(meetLinkField)
536 528
     }
537 529
 
@@ -569,10 +561,6 @@ private extension ViewController {
569 561
     }
570 562
 
571 563
     @objc private func instantMeetClicked(_ sender: NSClickGestureRecognizer) {
572
-        guard storeKitCoordinator.hasPremiumAccess else {
573
-            showPaywall()
574
-            return
575
-        }
576 564
         guard let url = URL(string: "https://meet.google.com/new") else { return }
577 565
         openInDefaultBrowser(url: url)
578 566
     }
@@ -1035,22 +1023,20 @@ private extension ViewController {
1035 1023
     }
1036 1024
 
1037 1025
     private func refreshInstantMeetPremiumState() {
1038
-        let isPremium = storeKitCoordinator.hasPremiumAccess
1039
-        instantMeetCardView?.alphaValue = isPremium ? 1.0 : 0.65
1040
-        instantMeetTitleLabel?.alphaValue = isPremium ? 1.0 : 0.75
1041
-        instantMeetSubtitleLabel?.alphaValue = isPremium ? 1.0 : 0.75
1042
-        instantMeetCardView?.toolTip = isPremium ? nil : "Premium required. Click to open paywall."
1026
+        instantMeetCardView?.alphaValue = 1.0
1027
+        instantMeetTitleLabel?.alphaValue = 1.0
1028
+        instantMeetSubtitleLabel?.alphaValue = 1.0
1029
+        instantMeetCardView?.toolTip = nil
1043 1030
         instantMeetCardView?.onHoverChanged?(false)
1044 1031
 
1045
-        joinWithLinkCardView?.alphaValue = isPremium ? 1.0 : 0.65
1046
-        joinWithLinkTitleLabel?.alphaValue = isPremium ? 1.0 : 0.75
1047
-        meetLinkField?.isEditable = isPremium
1048
-        meetLinkField?.isSelectable = isPremium
1049
-        meetLinkField?.alphaValue = isPremium ? 1.0 : 0.75
1050
-        // Keep button enabled so non-premium taps can still trigger paywall.
1032
+        joinWithLinkCardView?.alphaValue = 1.0
1033
+        joinWithLinkTitleLabel?.alphaValue = 1.0
1034
+        meetLinkField?.isEditable = true
1035
+        meetLinkField?.isSelectable = true
1036
+        meetLinkField?.alphaValue = 1.0
1051 1037
         joinMeetPrimaryButton?.isEnabled = true
1052
-        joinMeetPrimaryButton?.alphaValue = isPremium ? 1.0 : 0.80
1053
-        joinWithLinkCardView?.toolTip = isPremium ? nil : "Premium required. Click to open paywall."
1038
+        joinMeetPrimaryButton?.alphaValue = 1.0
1039
+        joinWithLinkCardView?.toolTip = nil
1054 1040
     }
1055 1041
 
1056 1042
     private func handlePremiumAccessChanged(_ hasPremiumAccess: Bool) {
@@ -1812,21 +1798,11 @@ private extension ViewController {
1812 1798
         let hoverColor = baseColor.blended(withFraction: 0.10, of: hoverBlend) ?? baseColor
1813 1799
         instant.onHoverChanged = { [weak self] hovering in
1814 1800
             guard let self else { return }
1815
-            if self.storeKitCoordinator.hasPremiumAccess {
1816
-                instant.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
1817
-            } else {
1818
-                let disabledColor = self.palette.sectionCard.blended(withFraction: 0.22, of: self.palette.pageBackground) ?? self.palette.sectionCard
1819
-                instant.layer?.backgroundColor = disabledColor.cgColor
1820
-            }
1801
+            instant.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
1821 1802
         }
1822 1803
         codeCard.onHoverChanged = { [weak self] hovering in
1823 1804
             guard let self else { return }
1824
-            if self.storeKitCoordinator.hasPremiumAccess {
1825
-                codeCard.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
1826
-            } else {
1827
-                let disabledColor = self.palette.sectionCard.blended(withFraction: 0.22, of: self.palette.pageBackground) ?? self.palette.sectionCard
1828
-                codeCard.layer?.backgroundColor = disabledColor.cgColor
1829
-            }
1805
+            codeCard.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
1830 1806
         }
1831 1807
         instant.onHoverChanged?(false)
1832 1808
         codeCard.onHoverChanged?(false)