From d83175bc1d071d8e08c61a663bab5c778a3a48ae Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 30 May 2024 11:35:06 +0200 Subject: [PATCH 1/8] chore: change plan name to free --- src/lib/components/billing/alerts/limitReached.svelte | 4 +++- src/lib/components/billing/planComparisonBox.svelte | 4 ++-- src/lib/components/billing/planExcess.svelte | 4 ++-- src/lib/components/billing/usageRates.svelte | 5 ++--- src/lib/constants.ts | 2 +- src/lib/stores/billing.ts | 6 +++--- src/routes/console/createOrganization.svelte | 6 +++--- src/routes/console/onboarding/+page.svelte | 4 ++-- .../organization-[organization]/billing/+page.svelte | 8 +++++--- .../organization-[organization]/change-plan/+page.svelte | 6 ++++-- .../console/project-[project]/auth/templates/+page.svelte | 6 ++++-- .../storage/bucket-[bucket]/+page.svelte | 2 +- 12 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/lib/components/billing/alerts/limitReached.svelte b/src/lib/components/billing/alerts/limitReached.svelte index 7cb72e1d0..4d2bc17e5 100644 --- a/src/lib/components/billing/alerts/limitReached.svelte +++ b/src/lib/components/billing/alerts/limitReached.svelte @@ -14,7 +14,9 @@ type="error" title={`${$organization.name} usage has reached the ${tierToPlan($organization.billingPlan).name} plan limit`}> - Usage for the {$organization.name} organization has reached the limits of the Starter + Usage for the {$organization.name} organization has reached the limits of the {tierToPlan( + $organization.billingPlan + ).name} plan. Consider upgrading to increase your resource usage. diff --git a/src/lib/components/billing/planComparisonBox.svelte b/src/lib/components/billing/planComparisonBox.svelte index 85443bcfb..b17aa8437 100644 --- a/src/lib/components/billing/planComparisonBox.svelte +++ b/src/lib/components/billing/planComparisonBox.svelte @@ -13,7 +13,7 @@ (selectedTab = 'tier-0')}> - Starter + Free {plan.name} plan
    -
  • Everything in the Starter plan, plus:
  • +
  • Everything in the Free plan, plus:
  • Unlimited databases, buckets, functions
  • {plan.bandwidth}GB bandwidth
  • {plan.storage}GB storage
  • diff --git a/src/lib/components/billing/planExcess.svelte b/src/lib/components/billing/planExcess.svelte index 153b5cb99..04971036b 100644 --- a/src/lib/components/billing/planExcess.svelte +++ b/src/lib/components/billing/planExcess.svelte @@ -42,8 +42,8 @@ {#if excess?.members > 0} {#if currentTier === BillingPlan.STARTER} - The Starter plan has a limit of one organization member. By proceeding, all but the - creator of the organization admin will be removed. + The {plan.name} plan has a limit of one organization member. By proceeding, all but the creator + of the organization admin will be removed. {:else if currentTier === BillingPlan.PRO} Additional organization members on the Pro plan cost {collaboratorPrice} per member per billing period. By proceeding, you acknowledge your fees may increase in your next billing period. diff --git a/src/lib/components/billing/usageRates.svelte b/src/lib/components/billing/usageRates.svelte index f5654243a..b23fdae63 100644 --- a/src/lib/components/billing/usageRates.svelte +++ b/src/lib/components/billing/usageRates.svelte @@ -54,9 +54,8 @@ {#if isFree} - Usage on the Starter plan is limited for the following resources. Next billing period: {toLocaleDate( - nextDate - )}. + Usage on the {$plansInfo?.get(BillingPlan.STARTER)} plan is limited for the following resources. + Next billing period: {toLocaleDate(nextDate)}. {:else if org.billingPlan === BillingPlan.PRO}

    Usage on the Pro plan will be charged at the end of each billing period at the following diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 85795f75e..dcd29671e 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -367,7 +367,7 @@ export const feedbackDowngradeOptions = [ }, { value: 'starter', - label: 'The Starter plan is enough for my projects' + label: 'The Free plan is enough for my projects' }, { value: 'budget', diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index bd6b2881b..10d0989b1 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -111,7 +111,7 @@ export type TierData = { }; export const tierFree: TierData = { - name: 'Starter', + name: 'Free', description: 'For personal hobby projects of small scale and students.' }; @@ -218,9 +218,9 @@ export async function checkForUsageLimit(org: Organization) { if (now - lastNotification < 1000 * 60 * 60 * 24) return; localStorage.setItem('limitReachedNotification', now.toString()); - let message = `${org.name} has reached 75% of the Starter plan's ${resources.find((r) => r.value >= 75).name} limit. Upgrade to ensure there are no service disruptions.`; + let message = `${org.name} has reached 75% of the ${tierToPlan(BillingPlan.STARTER).name} plan's ${resources.find((r) => r.value >= 75).name} limit. Upgrade to ensure there are no service disruptions.`; if (resources.filter((r) => r.value >= 75)?.length > 1) { - message = `Usage for ${org.name} has reached 75% of the Starter plan limit. Upgrade to ensure there are no service disruptions.`; + message = `Usage for ${org.name} has reached 75% of the ${tierToPlan(BillingPlan.STARTER).name} plan limit. Upgrade to ensure there are no service disruptions.`; } addNotification({ type: 'warning', diff --git a/src/routes/console/createOrganization.svelte b/src/routes/console/createOrganization.svelte index fe4fbc844..70087ad91 100644 --- a/src/routes/console/createOrganization.svelte +++ b/src/routes/console/createOrganization.svelte @@ -49,9 +49,9 @@ Get ready for Appwrite Pro We will soon introduce the much-anticipated Pro plan. Your account will continue to have - access to one free Starter organization. If you manage more than one - organization, you will need to either upgrade to the Pro plan, transfer your projects to - a Pro organization, or migrate to self-hosting. + access to one free organization. If you manage more than one organization, you + will need to either upgrade to the Pro plan, transfer your projects to a Pro + organization, or migrate to self-hosting. diff --git a/src/routes/console/onboarding/+page.svelte b/src/routes/console/onboarding/+page.svelte index 1f7aac074..0ac45c44e 100644 --- a/src/routes/console/onboarding/+page.svelte +++ b/src/routes/console/onboarding/+page.svelte @@ -27,11 +27,11 @@ ? [ { value: BillingPlan.STARTER, - label: `Starter - ${formatCurrency($plansInfo.get(BillingPlan.STARTER).price)}/month` + label: `${tierToPlan(BillingPlan.STARTER).name} - ${formatCurrency($plansInfo.get(BillingPlan.STARTER).price)}/month` }, { value: BillingPlan.PRO, - label: `Pro - ${formatCurrency($plansInfo.get(BillingPlan.PRO).price)}/month + add-ons` + label: `${tierToPlan(BillingPlan.PRO).name} - ${formatCurrency($plansInfo.get(BillingPlan.PRO).price)}/month + add-ons` } ] : []; diff --git a/src/routes/console/organization-[organization]/billing/+page.svelte b/src/routes/console/organization-[organization]/billing/+page.svelte index 8f7f50b4b..51a165d07 100644 --- a/src/routes/console/organization-[organization]/billing/+page.svelte +++ b/src/routes/console/organization-[organization]/billing/+page.svelte @@ -10,7 +10,7 @@ import PaymentHistory from './paymentHistory.svelte'; import TaxId from './taxId.svelte'; import { Alert, Heading } from '$lib/components'; - import { failedInvoice, paymentMethods, upgradeURL } from '$lib/stores/billing'; + import { failedInvoice, paymentMethods, tierToPlan, upgradeURL } from '$lib/stores/billing'; import type { PaymentMethodData } from '$lib/sdk/billing'; import { onMount } from 'svelte'; import { page } from '$app/stores'; @@ -111,8 +111,10 @@ {/if} {#if $organization?.billingPlanDowngrade} - Your organization will change to a Starter plan once your current billing cycle ends and - your invoice is paid on {toLocaleDate($organization.billingNextInvoiceDate)}. + Your organization will change to a {tierToPlan(BillingPlan.STARTER).name} plan once your + current billing cycle ends and your invoice is paid on {toLocaleDate( + $organization.billingNextInvoiceDate + )}. {/if}

    diff --git a/src/routes/console/organization-[organization]/change-plan/+page.svelte b/src/routes/console/organization-[organization]/change-plan/+page.svelte index 046b57013..d9522ff89 100644 --- a/src/routes/console/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/console/organization-[organization]/change-plan/+page.svelte @@ -263,8 +263,10 @@

    {#if anyOrgFree && billingPlan === BillingPlan.PRO} - You are limited to one Starter organization per account. Consider upgrading or - deleting . diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index 792851d04..c76bb2716 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -58,6 +58,7 @@ EmailTemplateLocale } from '@appwrite.io/console'; import Email2FaTemplate from './email2FATemplate.svelte'; + import { tierToPlan } from '$lib/stores/billing'; const projectId = $page.params.project; @@ -139,8 +140,9 @@ href: `${base}/console/organization-${$organization.$id}/billing` } ]}> - All emails sent using the Starter plan will include attribution to Appwrite in - the signature. To send attribution-free emails, upgrade your plan. + All emails sent using the {tierToPlan(BillingPlan.STARTER).name} plan will include + attribution to Appwrite in the signature. To send attribution-free emails, upgrade + your plan. {/if} diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte index a59db0265..a83b4dcc5 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte @@ -112,7 +112,7 @@ - {#if tier === 'Starter'} + {#if tier === 'Free'}

    The {tier} plan has limits

    • {limit}GB total file storage
    • From d4bab8093bdaa6a714bc7c366a2ace76d1a576c3 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 5 Jun 2024 15:50:25 +0200 Subject: [PATCH 2/8] fix: missing name --- src/lib/components/billing/usageRates.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/billing/usageRates.svelte b/src/lib/components/billing/usageRates.svelte index b23fdae63..787f8a0cd 100644 --- a/src/lib/components/billing/usageRates.svelte +++ b/src/lib/components/billing/usageRates.svelte @@ -54,7 +54,7 @@ {#if isFree} - Usage on the {$plansInfo?.get(BillingPlan.STARTER)} plan is limited for the following resources. + Usage on the {$plansInfo?.get(BillingPlan.STARTER).name} plan is limited for the following resources. Next billing period: {toLocaleDate(nextDate)}. {:else if org.billingPlan === BillingPlan.PRO}

      From 897bbe43b156b18d9f9234e93c1efef5195b67be Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 5 Jun 2024 16:34:26 +0200 Subject: [PATCH 3/8] chore: update enum name --- .../billing/alerts/limitReached.svelte | 2 +- src/lib/components/billing/planExcess.svelte | 2 +- src/lib/components/billing/usageRates.svelte | 4 ++-- src/lib/components/support.svelte | 2 +- src/lib/constants.ts | 2 +- src/lib/layout/activity.svelte | 2 +- src/lib/layout/containerButton.svelte | 2 +- src/lib/layout/containerHeader.svelte | 8 ++++---- src/lib/layout/header.svelte | 2 +- src/lib/layout/logs.svelte | 2 +- src/lib/stores/billing.ts | 14 +++++++------- src/routes/console/+layout.svelte | 2 +- .../console/account/organizations/+page.svelte | 4 ++-- .../console/create-organization/+page.svelte | 14 +++++++------- src/routes/console/onboarding/+page.svelte | 6 +++--- .../billing/+page.svelte | 6 +++--- .../billing/availableCredit.svelte | 6 +++--- .../billing/budgetCap.svelte | 4 ++-- .../billing/planSummary.svelte | 6 +++--- .../change-plan/+page.svelte | 16 ++++++++-------- .../organization-[organization]/header.svelte | 6 +++--- .../usage/[[invoice]]/+page.svelte | 4 ++-- .../usage/[[invoice]]/totalMembers.svelte | 2 +- .../auth/templates/+page.svelte | 7 +++---- .../function-[function]/executions/+page.svelte | 2 +- .../project-[project]/settings/smtp/+page.svelte | 5 ++--- .../settings/usage/[[invoice]]/+page.svelte | 4 ++-- .../bucket-[bucket]/create-file/step1.svelte | 4 ++-- .../settings/updateMaxFileSize.svelte | 4 ++-- 29 files changed, 71 insertions(+), 73 deletions(-) diff --git a/src/lib/components/billing/alerts/limitReached.svelte b/src/lib/components/billing/alerts/limitReached.svelte index 4d2bc17e5..03bc5c2bf 100644 --- a/src/lib/components/billing/alerts/limitReached.svelte +++ b/src/lib/components/billing/alerts/limitReached.svelte @@ -9,7 +9,7 @@ import { organization } from '$lib/stores/organization'; -{#if $organization?.$id && $organization?.billingPlan === BillingPlan.STARTER && $readOnly && !hideBillingHeaderRoutes.includes($page.url.pathname)} +{#if $organization?.$id && $organization?.billingPlan === BillingPlan.FREE && $readOnly && !hideBillingHeaderRoutes.includes($page.url.pathname)} diff --git a/src/lib/components/billing/planExcess.svelte b/src/lib/components/billing/planExcess.svelte index 76e1a04fc..40900ad0a 100644 --- a/src/lib/components/billing/planExcess.svelte +++ b/src/lib/components/billing/planExcess.svelte @@ -53,7 +53,7 @@ )} Following payment of your final invoice, your organization will switch to the {tierToPlan( - BillingPlan.STARTER + BillingPlan.FREE ).name} plan. {#if excess?.members > 0}All team members except the owner will be removed on that date.{/if} Service disruptions may occur unless resource usage is reduced. diff --git a/src/lib/components/billing/usageRates.svelte b/src/lib/components/billing/usageRates.svelte index 787f8a0cd..c2d5c73ae 100644 --- a/src/lib/components/billing/usageRates.svelte +++ b/src/lib/components/billing/usageRates.svelte @@ -49,12 +49,12 @@ } ]; - $: isFree = org.billingPlan === BillingPlan.STARTER; + $: isFree = org.billingPlan === BillingPlan.FREE; {#if isFree} - Usage on the {$plansInfo?.get(BillingPlan.STARTER).name} plan is limited for the following resources. + Usage on the {$plansInfo?.get(BillingPlan.FREE).name} plan is limited for the following resources. Next billing period: {toLocaleDate(nextDate)}. {:else if org.billingPlan === BillingPlan.PRO}

      diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte index ec768ed4a..64ec1725a 100644 --- a/src/lib/components/support.svelte +++ b/src/lib/components/support.svelte @@ -30,7 +30,7 @@

      {/if}
    - {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE} to increase your log retention for a longer period. {/if} diff --git a/src/lib/layout/containerButton.svelte b/src/lib/layout/containerButton.svelte index 6c39746ad..97fb3efd7 100644 --- a/src/lib/layout/containerButton.svelte +++ b/src/lib/layout/containerButton.svelte @@ -7,7 +7,7 @@ export let title: string; export let tooltipContent = - $organization.billingPlan === BillingPlan.STARTER + $organization.billingPlan === BillingPlan.FREE ? `Upgrade to add more ${title.toLocaleLowerCase()}` : `You've reached the ${title.toLocaleLowerCase()} limit for the ${ tierToPlan($organization.billingPlan).name diff --git a/src/lib/layout/containerHeader.svelte b/src/lib/layout/containerHeader.svelte index 28ba8114b..9e6d3df8d 100644 --- a/src/lib/layout/containerHeader.svelte +++ b/src/lib/layout/containerHeader.svelte @@ -63,7 +63,7 @@ $: tier = tierToPlan($organization?.billingPlan)?.name; $: hasProjectLimitation = - checkForProjectLimitation(serviceId) && $organization?.billingPlan === BillingPlan.STARTER; + checkForProjectLimitation(serviceId) && $organization?.billingPlan === BillingPlan.FREE; $: hasUsageFees = hasProjectLimitation ? checkForUsageFees($organization?.billingPlan, serviceId) : false; @@ -88,7 +88,7 @@ }) .join(', ')} - {#if $organization?.billingPlan !== BillingPlan.STARTER && hasUsageFees} + {#if $organization?.billingPlan !== BillingPlan.FREE && hasUsageFees} You've reached the {services} limit for the {tier} plan. @@ -135,7 +135,7 @@

    You are limited to {limit} {title.toLocaleLowerCase()} per project on the {tier} plan. - {#if $organization?.billingPlan === BillingPlan.STARTER} for additional {title.toLocaleLowerCase()}. {/if} diff --git a/src/lib/layout/header.svelte b/src/lib/layout/header.svelte index 14d58eb68..cf52cab7c 100644 --- a/src/lib/layout/header.svelte +++ b/src/lib/layout/header.svelte @@ -103,7 +103,7 @@

{#if isDowngrade} - + {/if} {#if billingPlan === BillingPlan.PRO && $organization.billingPlan !== BillingPlan.PRO} @@ -349,7 +349,7 @@ {/if} {/if} - {#if !isUpgrade && billingPlan === BillingPlan.STARTER && $organization.billingPlan !== BillingPlan.STARTER} + {#if !isUpgrade && billingPlan === BillingPlan.FREE && $organization.billingPlan !== BillingPlan.FREE} - {#if billingPlan !== BillingPlan.STARTER && $organization.billingPlan !== BillingPlan.PRO} + {#if billingPlan !== BillingPlan.FREE && $organization.billingPlan !== BillingPlan.PRO} {$organization.name} - {#if isCloud && $organization?.billingPlan === BillingPlan.STARTER} + {#if isCloud && $organization?.billingPlan === BillingPlan.FREE} FREE {/if} - {#if isCloud && $organization?.billingTrialStartDate && $daysLeftInTrial > 0 && $organization.billingPlan !== BillingPlan.STARTER && $plansInfo.get($organization.billingPlan)?.trialDays} + {#if isCloud && $organization?.billingTrialStartDate && $daysLeftInTrial > 0 && $organization.billingPlan !== BillingPlan.FREE && $plansInfo.get($organization.billingPlan)?.trialDays}
Usage - {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE}

- {:else if $organization.billingPlan === BillingPlan.STARTER} + {:else if $organization.billingPlan === BillingPlan.FREE}

If you exceed the limits of the {plan} plan, services for your organization's projects may be disrupted. diff --git a/src/routes/console/organization-[organization]/usage/[[invoice]]/totalMembers.svelte b/src/routes/console/organization-[organization]/usage/[[invoice]]/totalMembers.svelte index 950b4c30e..ffaaea59b 100644 --- a/src/routes/console/organization-[organization]/usage/[[invoice]]/totalMembers.svelte +++ b/src/routes/console/organization-[organization]/usage/[[invoice]]/totalMembers.svelte @@ -30,7 +30,7 @@

The number of members in your organization.

- {#if $organization.billingPlan !== BillingPlan.STARTER} + {#if $organization.billingPlan !== BillingPlan.FREE}

diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index c76bb2716..3ebd9cbb0 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -132,7 +132,7 @@

- {#if $organization.billingPlan === BillingPlan.STARTER} + {#if $organization.billingPlan === BillingPlan.FREE} - All emails sent using the {tierToPlan(BillingPlan.STARTER).name} plan will include - attribution to Appwrite in the signature. To send attribution-free emails, upgrade - your plan. + All emails sent using the {tierToPlan(BillingPlan.FREE).name} plan will include attribution + to Appwrite in the signature. To send attribution-free emails, upgrade your plan. {/if} diff --git a/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte index 845e80031..c9eae98f7 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte @@ -65,7 +65,7 @@ {hoursToDays(logs)} of logs - {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE}

diff --git a/src/routes/console/project-[project]/settings/smtp/+page.svelte b/src/routes/console/project-[project]/settings/smtp/+page.svelte index 0744dd7bd..83f27b5fe 100644 --- a/src/routes/console/project-[project]/settings/smtp/+page.svelte +++ b/src/routes/console/project-[project]/settings/smtp/+page.svelte @@ -131,7 +131,7 @@ class="link">here

- {#if $organization.billingPlan === BillingPlan.STARTER} + {#if $organization.billingPlan === BillingPlan.FREE} Custom SMTP is a Pro plan feature. Upgrade to enable custom SMTP sever. @@ -205,8 +205,7 @@ diff --git a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte index 68eae0863..a4d52bdf4 100644 --- a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte +++ b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte @@ -50,7 +50,7 @@
Usage - {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE} @@ -71,7 +71,7 @@ on:click={() => ($showUsageRatesModal = true)} link>Learn more about plan usage limits.

- {:else if $organization.billingPlan === BillingPlan.STARTER} + {:else if $organization.billingPlan === BillingPlan.FREE}

If you exceed the limits of the {plan} plan, services for your projects may be disrupted. Upgrade for greater capacity. diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte index 5221a5c1d..baac12a12 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte @@ -27,12 +27,12 @@ The {plan.name} plan has a maximum upload file size limit of {Math.floor( parseInt(size.value) )}{size.unit}. - {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE} Upgrade to allow files of a larger size. {/if}

- {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE}
diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte index 32744f5b9..133fde689 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte @@ -41,12 +41,12 @@ The {plan.name} plan has a maximum upload file size limit of {Math.floor( parseInt(size.value) )}{size.unit}. - {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE} Upgrade to allow files of a larger size. {/if}

- {#if $organization?.billingPlan === BillingPlan.STARTER} + {#if $organization?.billingPlan === BillingPlan.FREE}
From 9a502a0ce6d4961bc0d072cd6b2a2bce8e04baf1 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 5 Jun 2024 16:36:52 +0200 Subject: [PATCH 4/8] fix: missed linked conversion --- src/lib/components/billing/planExcess.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/billing/planExcess.svelte b/src/lib/components/billing/planExcess.svelte index 40900ad0a..4005487bd 100644 --- a/src/lib/components/billing/planExcess.svelte +++ b/src/lib/components/billing/planExcess.svelte @@ -61,7 +61,7 @@
From a706d701829e812ee15857277c53b296afc07242 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 5 Jun 2024 16:40:12 +0200 Subject: [PATCH 5/8] fix: make code more robust --- .../storage/bucket-[bucket]/+page.svelte | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte index a83b4dcc5..d9c463367 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte @@ -19,7 +19,7 @@ PaginationWithLimit, SearchQuery } from '$lib/components'; - import { Dependencies } from '$lib/constants'; + import { BillingPlan, Dependencies } from '$lib/constants'; import { Pill } from '$lib/elements'; import { Button } from '$lib/elements/forms'; import { @@ -45,7 +45,12 @@ import { uploader } from '$lib/stores/uploader'; import { wizard } from '$lib/stores/wizard'; import { tooltip } from '$lib/actions/tooltip'; - import { getServiceLimit, showUsageRatesModal } from '$lib/stores/billing'; + import { + getServiceLimit, + plansInfo, + showUsageRatesModal, + tierToPlan + } from '$lib/stores/billing'; import { sdk } from '$lib/stores/sdk.js'; import Create from './create-file/create.svelte'; import DeleteFile from './deleteFile.svelte'; @@ -112,7 +117,7 @@
- {#if tier === 'Free'} + {#if tier === tierToPlan(BillingPlan.FREE).name}

The {tier} plan has limits

  • {limit}GB total file storage
  • From 822490ad0feb010c50ccf887be2ece1c44cb2d63 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 5 Jun 2024 16:49:52 +0200 Subject: [PATCH 6/8] fix: linter --- .../project-[project]/storage/bucket-[bucket]/+page.svelte | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte index d9c463367..1726305ae 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte @@ -45,12 +45,7 @@ import { uploader } from '$lib/stores/uploader'; import { wizard } from '$lib/stores/wizard'; import { tooltip } from '$lib/actions/tooltip'; - import { - getServiceLimit, - plansInfo, - showUsageRatesModal, - tierToPlan - } from '$lib/stores/billing'; + import { getServiceLimit, showUsageRatesModal, tierToPlan } from '$lib/stores/billing'; import { sdk } from '$lib/stores/sdk.js'; import Create from './create-file/create.svelte'; import DeleteFile from './deleteFile.svelte'; From 0c3a167688db59c77d45681093f00044307c160e Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 6 Jun 2024 17:37:18 +0200 Subject: [PATCH 7/8] fix: better uptime iframe --- src/lib/components/support.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte index ec768ed4a..ceab4c209 100644 --- a/src/lib/components/support.svelte +++ b/src/lib/components/support.svelte @@ -63,6 +63,7 @@
    {#key $app.themeInUse}