From cd3eb0bd5d5956ae3bc7ca2e5e77497573a61eef Mon Sep 17 00:00:00 2001 From: bymyself Date: Wed, 29 Oct 2025 20:45:37 -0700 Subject: [PATCH 1/2] [feat] Gate top-up functionality on active subscription Prevent users without active subscriptions from accessing credit top-up features by checking isActiveSubscription across all entry points. Changes: - Hide Purchase Credits button in CreditsPanel when no active subscription - Block purchaseCredits function execution if subscription inactive - Gate showTopUpCreditsDialog service method - Prevent auto-trigger of top-up dialog on insufficient credits error - Fix CurrentUserPopover test mock for isActiveSubscription ref --- src/components/dialog/content/setting/CreditsPanel.vue | 4 +++- src/composables/auth/useFirebaseAuthActions.ts | 4 ++++ src/scripts/app.ts | 10 +++++++--- src/services/dialogService.ts | 4 ++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/dialog/content/setting/CreditsPanel.vue b/src/components/dialog/content/setting/CreditsPanel.vue index fd1c537d7f..a5eea8a065 100644 --- a/src/components/dialog/content/setting/CreditsPanel.vue +++ b/src/components/dialog/content/setting/CreditsPanel.vue @@ -15,7 +15,7 @@