mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Make sure license gets pushed and saved for default license replacements (#5001)
This commit is contained in:
@@ -9,7 +9,6 @@ import AvailablePlansSection from '@app/components/shared/config/configSections/
|
|||||||
import StaticPlanSection from '@app/components/shared/config/configSections/plan/StaticPlanSection';
|
import StaticPlanSection from '@app/components/shared/config/configSections/plan/StaticPlanSection';
|
||||||
import { alert } from '@app/components/toast';
|
import { alert } from '@app/components/toast';
|
||||||
import LocalIcon from '@app/components/shared/LocalIcon';
|
import LocalIcon from '@app/components/shared/LocalIcon';
|
||||||
import { ManageBillingButton } from '@app/components/shared/ManageBillingButton';
|
|
||||||
import { InfoBanner } from '@app/components/shared/InfoBanner';
|
import { InfoBanner } from '@app/components/shared/InfoBanner';
|
||||||
import { useLicenseAlert } from '@app/hooks/useLicenseAlert';
|
import { useLicenseAlert } from '@app/hooks/useLicenseAlert';
|
||||||
import { isSupabaseConfigured } from '@app/services/supabaseClient';
|
import { isSupabaseConfigured } from '@app/services/supabaseClient';
|
||||||
@@ -223,18 +222,6 @@ const AdminPlanSection: React.FC = () => {
|
|||||||
buttonColor="orange.7"
|
buttonColor="orange.7"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{/* Manage Subscription Button - Only show if user has active license and Supabase is configured */}
|
|
||||||
{licenseInfo?.licenseKey && isSupabaseConfigured && (
|
|
||||||
<Paper withBorder p="md" radius="md">
|
|
||||||
<Group justify="space-between" align="center">
|
|
||||||
<Text size="sm" c="dimmed">
|
|
||||||
{t('plan.manageSubscription.description', 'Manage your subscription, billing, and payment methods')}
|
|
||||||
</Text>
|
|
||||||
<ManageBillingButton />
|
|
||||||
</Group>
|
|
||||||
</Paper>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<AvailablePlansSection
|
<AvailablePlansSection
|
||||||
plans={plans}
|
plans={plans}
|
||||||
currentLicenseInfo={licenseInfo}
|
currentLicenseInfo={licenseInfo}
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ export const CheckoutProvider: React.FC<CheckoutProviderProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is an upgrade or new subscription
|
// Check if this is an upgrade or new subscription
|
||||||
if (licenseInfo?.licenseKey) {
|
// Only treat as upgrade if there's a valid PRO/ENTERPRISE license (not NORMAL/free tier)
|
||||||
|
if (licenseInfo?.licenseType && licenseInfo.licenseType !== 'NORMAL') {
|
||||||
// UPGRADE: Resync existing license with Keygen
|
// UPGRADE: Resync existing license with Keygen
|
||||||
console.log('Upgrade detected - resyncing existing license');
|
console.log('Upgrade detected - resyncing existing license');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user