diff --git a/src/lib/components/billing/alerts/tooManyFreeOrgs.svelte b/src/lib/components/billing/alerts/tooManyFreeOrgs.svelte deleted file mode 100644 index cf37e4d45e..0000000000 --- a/src/lib/components/billing/alerts/tooManyFreeOrgs.svelte +++ /dev/null @@ -1,13 +0,0 @@ - - - - All but one organization will be automatically upgraded to a Pro plan on 31 January 2024. - You can add a payment method or transfer projects from your settings. - - - - - diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index a86f8c8ae3..22b8738282 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -5,14 +5,13 @@ import { organization, type Organization } from './organization'; import type { InvoiceList, AddressesList, Invoice, PaymentList, PlansMap } from '$lib/sdk/billing'; import { isCloud } from '$lib/system'; import { cachedStore } from '$lib/helpers/cache'; -import { Query, type Models } from '@appwrite.io/console'; +import { Query } from '@appwrite.io/console'; import { headerAlert } from './headerAlert'; import PaymentAuthRequired from '$lib/components/billing/alerts/paymentAuthRequired.svelte'; import { addNotification, notifications } from './notifications'; import { goto } from '$app/navigation'; import { base } from '$app/paths'; -import TooManyFreOrgs from '$lib/components/billing/alerts/tooManyFreeOrgs.svelte'; -import { activeHeaderAlert, showPostReleaseModal } from '$routes/console/store'; +import { activeHeaderAlert } from '$routes/console/store'; import MarkedForDeletion from '$lib/components/billing/alerts/markedForDeletion.svelte'; import { BillingPlan } from '$lib/constants'; @@ -266,35 +265,3 @@ export function checkForMarkedForDeletion(org: Organization) { }); } } - -export async function checkForFreeOrgOverflow(orgs: Models.TeamList>) { - if (orgs?.teams?.length > 1) { - headerAlert.add({ - id: 'freeOrgOverflow', - component: TooManyFreOrgs, - show: true, - importance: 10 - }); - activeHeaderAlert.set(headerAlert.get()); - } -} - -export async function checkForPostReleaseProModal(orgs: Models.TeamList>) { - if (!orgs?.teams?.length) return; - if (orgs.total > orgs.teams.length) return; // if the total is greater that the free orgs it means that there are pro orgs - const modalTime = localStorage.getItem('postReleaseProModal'); - const now = Date.now(); - // show the modal if it was never shown - if (!modalTime) { - localStorage.setItem('postReleaseProModal', Date.now().toString()); - showPostReleaseModal.set(true); - } else { - const interval = 5 * 24 * 60 * 60 * 1000; - const sinceLastModal = now - parseInt(modalTime); - // show the modal if it was shown more than 5 days ago - if (sinceLastModal > interval) { - localStorage.setItem('postReleaseProModal', Date.now().toString()); - showPostReleaseModal.set(true); - } - } -} diff --git a/src/lib/system.ts b/src/lib/system.ts index 16e26d13f2..5cb998dcad 100644 --- a/src/lib/system.ts +++ b/src/lib/system.ts @@ -23,4 +23,4 @@ export const MODE = VARS.CONSOLE_MODE === Mode.CLOUD ? Mode.CLOUD : Mode.SELF_HO export const isCloud = MODE === Mode.CLOUD; export const isSelfHosted = MODE !== Mode.CLOUD; export const hasStripePublicKey = !!VARS.STRIPE_PUBLIC_KEY; -export const GRACE_PERIOD_OVERRIDE = true; +export const GRACE_PERIOD_OVERRIDE = false; diff --git a/src/routes/console/(billing-modal)/hoodie.png b/src/routes/console/(billing-modal)/hoodie.png deleted file mode 100644 index 467ad1af75..0000000000 Binary files a/src/routes/console/(billing-modal)/hoodie.png and /dev/null differ diff --git a/src/routes/console/(billing-modal)/hoodieCover.svelte b/src/routes/console/(billing-modal)/hoodieCover.svelte deleted file mode 100644 index 19fbaa6c5c..0000000000 --- a/src/routes/console/(billing-modal)/hoodieCover.svelte +++ /dev/null @@ -1,242 +0,0 @@ - - - - -
- - Appwrite - - -
-
-
-
- -
- APPWRITE - - PRO -
- - Your organization has been upgraded 🎉 - -

- Gear up for your new Pro plan! Share online for a chance to win an exclusive - Appwrite Pro hoodie. -

- -
- -
- -
- -
-
- -
- -
-
-
-
- - diff --git a/src/routes/console/(billing-modal)/postReleaseModal.svelte b/src/routes/console/(billing-modal)/postReleaseModal.svelte deleted file mode 100644 index 145da0c9a7..0000000000 --- a/src/routes/console/(billing-modal)/postReleaseModal.svelte +++ /dev/null @@ -1,130 +0,0 @@ - - - - - {#if $app.themeInUse === 'dark'} - - {:else} - - {/if} - - -
-

- Upgrade now and use the code {isNewUser ? 'PRO15' : 'THANKYOU30'} - to claim ${isNewUser ? '15' : '30'} in credits for a Pro plan. Credits will expire on 31 - January 2024. -

-
- - Pro: $15 per member per billing period - -

- For pro developers and teams that need to scale their products. -

- - {#if freeOrgs?.length > 1 && options?.length} - - - - {:else} -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
- {/if} - -
-
diff --git a/src/routes/console/(billing-modal)/side-dark.png b/src/routes/console/(billing-modal)/side-dark.png deleted file mode 100644 index 85c816cf66..0000000000 Binary files a/src/routes/console/(billing-modal)/side-dark.png and /dev/null differ diff --git a/src/routes/console/(billing-modal)/side-light.png b/src/routes/console/(billing-modal)/side-light.png deleted file mode 100644 index 22d059de36..0000000000 Binary files a/src/routes/console/(billing-modal)/side-light.png and /dev/null differ diff --git a/src/routes/console/+layout.svelte b/src/routes/console/+layout.svelte index e6cdd038c1..dccfe71a49 100644 --- a/src/routes/console/+layout.svelte +++ b/src/routes/console/+layout.svelte @@ -1,6 +1,6 @@