Pārlūkot izejas kodu

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 3 mēneši atpakaļ
vecāks
revīzija
19cd61d198
1 mainītis faili ar 13 papildinājumiem un 37 dzēšanām
  1. 13 37
      meetings_app/ViewController.swift

+ 13 - 37
meetings_app/ViewController.swift

@@ -510,10 +510,6 @@ private extension ViewController {
     }
 
     @objc private func joinMeetClicked(_ sender: Any?) {
-        guard storeKitCoordinator.hasPremiumAccess else {
-            showPaywall()
-            return
-        }
         let rawInput = meetLinkField?.stringValue.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
 
         guard let url = normalizedMeetJoinURL(from: rawInput) else {
@@ -528,10 +524,6 @@ private extension ViewController {
     }
 
     @objc private func joinWithLinkCardClicked(_ sender: NSClickGestureRecognizer) {
-        guard storeKitCoordinator.hasPremiumAccess else {
-            showPaywall()
-            return
-        }
         meetLinkField?.window?.makeFirstResponder(meetLinkField)
     }
 
@@ -569,10 +561,6 @@ private extension ViewController {
     }
 
     @objc private func instantMeetClicked(_ sender: NSClickGestureRecognizer) {
-        guard storeKitCoordinator.hasPremiumAccess else {
-            showPaywall()
-            return
-        }
         guard let url = URL(string: "https://meet.google.com/new") else { return }
         openInDefaultBrowser(url: url)
     }
@@ -1035,22 +1023,20 @@ private extension ViewController {
     }
 
     private func refreshInstantMeetPremiumState() {
-        let isPremium = storeKitCoordinator.hasPremiumAccess
-        instantMeetCardView?.alphaValue = isPremium ? 1.0 : 0.65
-        instantMeetTitleLabel?.alphaValue = isPremium ? 1.0 : 0.75
-        instantMeetSubtitleLabel?.alphaValue = isPremium ? 1.0 : 0.75
-        instantMeetCardView?.toolTip = isPremium ? nil : "Premium required. Click to open paywall."
+        instantMeetCardView?.alphaValue = 1.0
+        instantMeetTitleLabel?.alphaValue = 1.0
+        instantMeetSubtitleLabel?.alphaValue = 1.0
+        instantMeetCardView?.toolTip = nil
         instantMeetCardView?.onHoverChanged?(false)
 
-        joinWithLinkCardView?.alphaValue = isPremium ? 1.0 : 0.65
-        joinWithLinkTitleLabel?.alphaValue = isPremium ? 1.0 : 0.75
-        meetLinkField?.isEditable = isPremium
-        meetLinkField?.isSelectable = isPremium
-        meetLinkField?.alphaValue = isPremium ? 1.0 : 0.75
-        // Keep button enabled so non-premium taps can still trigger paywall.
+        joinWithLinkCardView?.alphaValue = 1.0
+        joinWithLinkTitleLabel?.alphaValue = 1.0
+        meetLinkField?.isEditable = true
+        meetLinkField?.isSelectable = true
+        meetLinkField?.alphaValue = 1.0
         joinMeetPrimaryButton?.isEnabled = true
-        joinMeetPrimaryButton?.alphaValue = isPremium ? 1.0 : 0.80
-        joinWithLinkCardView?.toolTip = isPremium ? nil : "Premium required. Click to open paywall."
+        joinMeetPrimaryButton?.alphaValue = 1.0
+        joinWithLinkCardView?.toolTip = nil
     }
 
     private func handlePremiumAccessChanged(_ hasPremiumAccess: Bool) {
@@ -1812,21 +1798,11 @@ private extension ViewController {
         let hoverColor = baseColor.blended(withFraction: 0.10, of: hoverBlend) ?? baseColor
         instant.onHoverChanged = { [weak self] hovering in
             guard let self else { return }
-            if self.storeKitCoordinator.hasPremiumAccess {
-                instant.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
-            } else {
-                let disabledColor = self.palette.sectionCard.blended(withFraction: 0.22, of: self.palette.pageBackground) ?? self.palette.sectionCard
-                instant.layer?.backgroundColor = disabledColor.cgColor
-            }
+            instant.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
         }
         codeCard.onHoverChanged = { [weak self] hovering in
             guard let self else { return }
-            if self.storeKitCoordinator.hasPremiumAccess {
-                codeCard.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
-            } else {
-                let disabledColor = self.palette.sectionCard.blended(withFraction: 0.22, of: self.palette.pageBackground) ?? self.palette.sectionCard
-                codeCard.layer?.backgroundColor = disabledColor.cgColor
-            }
+            codeCard.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
         }
         instant.onHoverChanged?(false)
         codeCard.onHoverChanged?(false)