From 3628f04f1f6f74118e6058731996811ac8c0afb5 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 3 Apr 2024 15:02:46 +0200 Subject: [PATCH 01/17] feat: email signature card --- src/lib/components/emptyCardAsideCloud.svelte | 32 ++++++++++++ src/lib/stores/billing.ts | 22 +++++++++ .../auth/templates/+page.svelte | 2 + .../auth/templates/emailSignature.svelte | 49 +++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 src/lib/components/emptyCardAsideCloud.svelte create mode 100644 src/routes/console/project-[project]/auth/templates/emailSignature.svelte diff --git a/src/lib/components/emptyCardAsideCloud.svelte b/src/lib/components/emptyCardAsideCloud.svelte new file mode 100644 index 000000000..bddc80eb6 --- /dev/null +++ b/src/lib/components/emptyCardAsideCloud.svelte @@ -0,0 +1,32 @@ + + + +
+

+ +

+

+ +

+ +
+
diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index c213a7147..a33f3e3af 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -45,6 +45,28 @@ export function tierToPlan(tier: Tier) { } } +export function getNextTier(tier: Tier) { + switch (tier) { + case BillingPlan.STARTER: + return BillingPlan.PRO; + case BillingPlan.PRO: + return BillingPlan.SCALE; + default: + return BillingPlan.PRO; + } +} + +export function getPreviousTier(tier: Tier) { + switch (tier) { + case BillingPlan.PRO: + return BillingPlan.STARTER; + case BillingPlan.SCALE: + return BillingPlan.PRO; + default: + return BillingPlan.STARTER; + } +} + export type PlanServices = | 'bandwidth' | 'bandwidthAddon' diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index 6d686d883..773e4d3cf 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -44,6 +44,7 @@ import ChangeOrganizationTierCloud from '$routes/console/changeOrganizationTierCloud.svelte'; import { wizard } from '$lib/stores/wizard'; import { BillingPlan } from '$lib/constants'; + import EmailSignature from './emailSignature.svelte'; const projectId = $page.params.project; @@ -233,4 +234,5 @@ --> + diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte new file mode 100644 index 000000000..85c42bdcb --- /dev/null +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -0,0 +1,49 @@ + + +
+ + Email signature +

Enable or disable Appwrite branding in your email template signature.

+ + + {#if $organization?.billingPlan && $organization.billingPlan !== BillingPlan.STARTER} + + + When enabled, Appwrite branding will be displayed in your email signature. + + + {:else} + + Upgrade to edit email signature + Upgrade to a {nextTier} plan to enable or disable Appwrite branding in your emails. + + {/if} + + + {#if $organization?.billingPlan && $organization.billingPlan !== BillingPlan.STARTER} + + {/if} + +
+
From 13c9e427898555066c0dcea718a9c48f8422fdca Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 19 Apr 2024 13:58:28 +0200 Subject: [PATCH 02/17] feat: new empty stage deisgn --- src/lib/components/card.svelte | 2 + src/lib/components/emptyCardAsideCloud.svelte | 44 +++++++++++-------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/lib/components/card.svelte b/src/lib/components/card.svelte index d5a3cbdb7..ea616bc70 100644 --- a/src/lib/components/card.svelte +++ b/src/lib/components/card.svelte @@ -26,6 +26,7 @@ export let href: string = null; let classes = ''; export { classes as class }; + export let style = ''; function getElement() { switch (true) { @@ -46,6 +47,7 @@ class:is-border-dashed={isDashed} class:is-danger={danger} class:is-allowed-focus={href} + {style} on:click on:keyup={clickOnEnter} role={href || isButton ? 'button' : 'generic'} diff --git a/src/lib/components/emptyCardAsideCloud.svelte b/src/lib/components/emptyCardAsideCloud.svelte index bddc80eb6..705af33f2 100644 --- a/src/lib/components/emptyCardAsideCloud.svelte +++ b/src/lib/components/emptyCardAsideCloud.svelte @@ -10,23 +10,31 @@ export let source = 'empty_state_card'; - -
-

- -

-

- -

- + +
+ {#if $$slots?.image} +
+
+ +
+
+ {/if} +
+

+

+ +

+ +
From caad487aef8f79bdd55e8e97f20541f0b1519e3f Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 19 Apr 2024 14:27:51 +0200 Subject: [PATCH 03/17] feat: add image --- package-lock.json | 18 +-- package.json | 4 +- .../auth/templates/emailSignature.svelte | 103 ++++++++++++++++++ 3 files changed, 114 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fc31fab0..b58263f75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,8 @@ "name": "@appwrite/console", "dependencies": { "@appwrite.io/console": "^0.5.0", - "@appwrite.io/pink": "0.11.0", - "@appwrite.io/pink-icons": "0.11.0", + "@appwrite.io/pink": "0.14.0", + "@appwrite.io/pink-icons": "0.14.0", "@popperjs/core": "^2.11.8", "@sentry/svelte": "^7.66.0", "@sentry/tracing": "^7.66.0", @@ -167,19 +167,19 @@ } }, "node_modules/@appwrite.io/pink": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.11.0.tgz", - "integrity": "sha512-0/ztJxeV6Cy1FnXy2ClLELzDnR4eRtGAhQ24napCg0VwOFevSIc0S7jcRrWVyA6WRuwex4eGiEn2JeYMTq70Xg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.14.0.tgz", + "integrity": "sha512-E1uFJ23otp5hF7ZgSJ0EXj4qIaxGFmvZYFOcKnqsXZsYCyfpl+pKK8V6HqUBjNy5xfElqHlkjAWuc/qdkXIwPQ==", "dependencies": { - "@appwrite.io/pink-icons": "0.11.0", + "@appwrite.io/pink-icons": "0.14.0", "normalize.css": "^8.0.1", "the-new-css-reset": "^1.11.2" } }, "node_modules/@appwrite.io/pink-icons": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.11.0.tgz", - "integrity": "sha512-FOvP87m4S17QRQPrLzsSlwrbIeJNJi5RliGUQYONIhmI0PiwE4Xm5LXFE+NqFYsR56w2X3jYdJIHdIdZlH3XjA==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.14.0.tgz", + "integrity": "sha512-RnY5xWC9/+utXFicaHRyiSe1LKF49l0fvmBjPcR6BZXH8yG7s4Ob0LVaVMWdnyFYWXQLo5Fq/ob0SqVSEOLgbA==" }, "node_modules/@babel/code-frame": { "version": "7.23.5", diff --git a/package.json b/package.json index 863f04765..68a6c5726 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ }, "dependencies": { "@appwrite.io/console": "^0.5.0", - "@appwrite.io/pink": "0.11.0", - "@appwrite.io/pink-icons": "0.11.0", + "@appwrite.io/pink": "0.14.0", + "@appwrite.io/pink-icons": "0.14.0", "@popperjs/core": "^2.11.8", "@sentry/svelte": "^7.66.0", "@sentry/tracing": "^7.66.0", diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index 85c42bdcb..e90bc0efa 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -35,6 +35,109 @@ {:else} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Upgrade to edit email signature Upgrade to a {nextTier} plan to enable or disable Appwrite branding in your emails. From 2e14b390545f06da2865996df02a2e72056da4c9 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 19 Apr 2024 14:31:39 +0200 Subject: [PATCH 04/17] fix: size --- .../project-[project]/auth/templates/emailSignature.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index e90bc0efa..4e842eeee 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -37,6 +37,7 @@ Date: Fri, 19 Apr 2024 14:33:05 +0200 Subject: [PATCH 05/17] chore: remove old code --- .../auth/templates/emailSignature.svelte | 254 ++++++++---------- 1 file changed, 107 insertions(+), 147 deletions(-) diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index 4e842eeee..f8151cb5f 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -1,153 +1,113 @@ -
- - Email signature -

Enable or disable Appwrite branding in your email template signature.

+ + Email signature +

Enable or disable Appwrite branding in your email template signature.

- - {#if $organization?.billingPlan && $organization.billingPlan !== BillingPlan.STARTER} - - - When enabled, Appwrite branding will be displayed in your email signature. - - - {:else} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Upgrade to edit email signature - Upgrade to a {nextTier} plan to enable or disable Appwrite branding in your emails. - - {/if} - - - {#if $organization?.billingPlan && $organization.billingPlan !== BillingPlan.STARTER} - - {/if} - -
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Upgrade to edit email signature + Upgrade to a {nextTier} plan to enable or disable Appwrite branding in your emails. + + + From 6a9cc96b006c1a41fa1d34309890158f1ab7c840 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 19 Apr 2024 14:34:55 +0200 Subject: [PATCH 06/17] feat: add display condition --- .../console/project-[project]/auth/templates/+page.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index 773e4d3cf..a49b811d8 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -45,6 +45,7 @@ import { wizard } from '$lib/stores/wizard'; import { BillingPlan } from '$lib/constants'; import EmailSignature from './emailSignature.svelte'; + import { isCloud } from '$lib/system'; const projectId = $page.params.project; @@ -234,5 +235,7 @@
--> - + {#if isCloud && $organization?.billingPlan === BillingPlan.STARTER} + + {/if} From de68609bf3edda68db27670c8f9e3c53bb3a9c49 Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 23 Apr 2024 14:17:22 +0200 Subject: [PATCH 07/17] feat: add images --- src/lib/components/emptyCardAsideCloud.svelte | 2 +- src/lib/components/index.ts | 1 + .../auth/templates/email-footer-dark.svg | 59 ++++++++ .../auth/templates/email-footer-light.svg | 54 +++++++ .../templates/email-footer-mobile-dark.svg | 59 ++++++++ .../templates/email-footer-mobile-light.svg | 54 +++++++ .../auth/templates/emailSignature.svelte | 133 +++++------------- 7 files changed, 266 insertions(+), 96 deletions(-) create mode 100644 src/routes/console/project-[project]/auth/templates/email-footer-dark.svg create mode 100644 src/routes/console/project-[project]/auth/templates/email-footer-light.svg create mode 100644 src/routes/console/project-[project]/auth/templates/email-footer-mobile-dark.svg create mode 100644 src/routes/console/project-[project]/auth/templates/email-footer-mobile-light.svg diff --git a/src/lib/components/emptyCardAsideCloud.svelte b/src/lib/components/emptyCardAsideCloud.svelte index 705af33f2..28e964eea 100644 --- a/src/lib/components/emptyCardAsideCloud.svelte +++ b/src/lib/components/emptyCardAsideCloud.svelte @@ -10,7 +10,7 @@ export let source = 'empty_state_card'; - +
{#if $$slots?.image}
diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index 781ce567c..f2d98872a 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -71,3 +71,4 @@ export { default as FakeModal } from './fakeModal.svelte'; export { default as RadioBoxes } from './radioBoxes.svelte'; export { default as ModalWrapper } from './modalWrapper.svelte'; export { default as ModalSideCol } from './modalSideCol.svelte'; +export { default as EmptyCardAsideCloud } from './emptyCardAsideCloud.svelte'; diff --git a/src/routes/console/project-[project]/auth/templates/email-footer-dark.svg b/src/routes/console/project-[project]/auth/templates/email-footer-dark.svg new file mode 100644 index 000000000..575f31346 --- /dev/null +++ b/src/routes/console/project-[project]/auth/templates/email-footer-dark.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/routes/console/project-[project]/auth/templates/email-footer-light.svg b/src/routes/console/project-[project]/auth/templates/email-footer-light.svg new file mode 100644 index 000000000..c2ee5f339 --- /dev/null +++ b/src/routes/console/project-[project]/auth/templates/email-footer-light.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/routes/console/project-[project]/auth/templates/email-footer-mobile-dark.svg b/src/routes/console/project-[project]/auth/templates/email-footer-mobile-dark.svg new file mode 100644 index 000000000..eef76c3bd --- /dev/null +++ b/src/routes/console/project-[project]/auth/templates/email-footer-mobile-dark.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/routes/console/project-[project]/auth/templates/email-footer-mobile-light.svg b/src/routes/console/project-[project]/auth/templates/email-footer-mobile-light.svg new file mode 100644 index 000000000..cd5086031 --- /dev/null +++ b/src/routes/console/project-[project]/auth/templates/email-footer-mobile-light.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index f8151cb5f..ae61045d6 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -1,6 +1,10 @@ @@ -10,101 +14,40 @@ - - - + {#if $app.themeInUse === 'dark'} + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + class="u-image-object-fit-cover u-only-dark" + alt="Email Signature Example" /> + {:else} + Email Signature Example + {/if} +
+
+ {#if $app.themeInUse === 'dark'} + Email Signature Example + {:else} + Email Signature Example + {/if} +
Upgrade to edit email signature Upgrade to a {nextTier} plan to enable or disable Appwrite branding in your emails. From 9872a733b0063a5f64f3ae0b635431629b8beff7 Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 23 Apr 2024 14:21:09 +0200 Subject: [PATCH 08/17] chore: rename stuff --- ...mptyCardAsideCloud.svelte => emptyCardImageCloud.svelte} | 0 src/lib/components/index.ts | 2 +- .../project-[project]/auth/templates/emailSignature.svelte | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/lib/components/{emptyCardAsideCloud.svelte => emptyCardImageCloud.svelte} (100%) diff --git a/src/lib/components/emptyCardAsideCloud.svelte b/src/lib/components/emptyCardImageCloud.svelte similarity index 100% rename from src/lib/components/emptyCardAsideCloud.svelte rename to src/lib/components/emptyCardImageCloud.svelte diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index f2d98872a..db0c9247c 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -71,4 +71,4 @@ export { default as FakeModal } from './fakeModal.svelte'; export { default as RadioBoxes } from './radioBoxes.svelte'; export { default as ModalWrapper } from './modalWrapper.svelte'; export { default as ModalSideCol } from './modalSideCol.svelte'; -export { default as EmptyCardAsideCloud } from './emptyCardAsideCloud.svelte'; +export { default as EmptyCardImageCloud } from './emptyCardImageCloud.svelte'; diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index ae61045d6..23c9f16a7 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -1,5 +1,5 @@ From f31c74fca94b87f76bef90c842c89ea43155963a Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 2 May 2024 16:15:45 +0200 Subject: [PATCH 11/17] feat: remove width and height --- .../auth/templates/emailSignature.svelte | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index 5af812daf..a42e13829 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -14,24 +14,20 @@ -
+
{#if $app.themeInUse === 'dark'} Email Signature Example {:else} Email Signature Example {/if}
-
+
{#if $app.themeInUse === 'dark'} Date: Fri, 24 May 2024 15:26:15 +0200 Subject: [PATCH 12/17] chore: update org upgrade button --- src/lib/components/emptyCardImageCloud.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/components/emptyCardImageCloud.svelte b/src/lib/components/emptyCardImageCloud.svelte index 28e964eea..985dd8011 100644 --- a/src/lib/components/emptyCardImageCloud.svelte +++ b/src/lib/components/emptyCardImageCloud.svelte @@ -1,10 +1,8 @@ @@ -14,7 +15,8 @@
+ class="file-preview is-full-cover-image u-width-full-line u-height-100-percent" + style={noAspectRatio ? 'aspect-ratio: auto' : ''}>
diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index 35ae2d84b..e1aa13e5a 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -259,7 +259,7 @@ --> - {#if isCloud && $organization?.billingPlan === BillingPlan.STARTER} + {#if isCloud && $organization?.billingPlan === BillingPlan.FREE} {/if} diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index 0ebbb7147..e09c5c302 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -12,7 +12,7 @@

Enable or disable Appwrite branding in your email template signature.

- +
{#if $app.themeInUse === 'dark'} @@ -33,14 +33,14 @@ src={EmailDark} width="266" height="171" - class="u-image-object-fit-cover u-block u-only-dark u-width-full-line u-height-100-percent" + class="u-image-object-fit-contain u-block u-only-dark u-width-full-line u-height-100-percent" alt="Email Signature Example" /> {:else} Email Signature Example {/if}
From 9e0ce123022bf7bfa397745c6443853fa85a4559 Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 13 Jun 2024 16:25:27 +0200 Subject: [PATCH 15/17] fix: design fixes --- .../project-[project]/auth/templates/+page.svelte | 15 +-------------- .../auth/templates/emailSignature.svelte | 2 ++ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index e1aa13e5a..91467021e 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -60,7 +60,6 @@ EmailTemplateLocale } from '@appwrite.io/console'; import Email2FaTemplate from './email2FATemplate.svelte'; - import { tierToPlan } from '$lib/stores/billing'; const projectId = $page.params.project; @@ -134,18 +133,6 @@

- {#if $organization.billingPlan === BillingPlan.FREE} - - 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} --> - {#if isCloud && $organization?.billingPlan === BillingPlan.FREE} + {#if isCloud && $organization?.billingPlan !== BillingPlan.FREE} {/if} diff --git a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte index e09c5c302..c00b1d61a 100644 --- a/src/routes/console/project-[project]/auth/templates/emailSignature.svelte +++ b/src/routes/console/project-[project]/auth/templates/emailSignature.svelte @@ -34,6 +34,7 @@ width="266" height="171" class="u-image-object-fit-contain u-block u-only-dark u-width-full-line u-height-100-percent" + style:object-position="top" alt="Email Signature Example" /> {:else} Email Signature Example {/if}
From f04b010c814628d75d7c54ec82c2474a8b3890d8 Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 18 Jun 2024 10:26:00 +0200 Subject: [PATCH 16/17] fix: condition --- .../console/project-[project]/auth/templates/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/templates/+page.svelte b/src/routes/console/project-[project]/auth/templates/+page.svelte index 91467021e..cc4d83c4d 100644 --- a/src/routes/console/project-[project]/auth/templates/+page.svelte +++ b/src/routes/console/project-[project]/auth/templates/+page.svelte @@ -246,7 +246,7 @@ --> - {#if isCloud && $organization?.billingPlan !== BillingPlan.FREE} + {#if isCloud && $organization?.billingPlan === BillingPlan.FREE} {/if} From 8d4dbfef3f575149bc78d192c3bd95e5170293c6 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 21 Jun 2024 15:03:28 +0200 Subject: [PATCH 17/17] fix: diagnostic --- src/lib/stores/billing.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index 3f15edccf..c875d4ab5 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -53,7 +53,7 @@ export function tierToPlan(tier: Tier) { export function getNextTier(tier: Tier) { switch (tier) { - case BillingPlan.STARTER: + case BillingPlan.FREE: return BillingPlan.PRO; case BillingPlan.PRO: return BillingPlan.SCALE; @@ -65,11 +65,11 @@ export function getNextTier(tier: Tier) { export function getPreviousTier(tier: Tier) { switch (tier) { case BillingPlan.PRO: - return BillingPlan.STARTER; + return BillingPlan.FREE; case BillingPlan.SCALE: return BillingPlan.PRO; default: - return BillingPlan.STARTER; + return BillingPlan.FREE; } }