From 0d59c4065c01c9b26262cd0682554409421146bb Mon Sep 17 00:00:00 2001 From: Zicklag Date: Sat, 14 Dec 2024 12:00:16 -0600 Subject: [PATCH] feat: improve information in free trial dialog. --- src/routes/(app)/[username]/+layout.svelte | 1 - .../components/ManageSubscriptionModal.svelte | 21 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/routes/(app)/[username]/+layout.svelte b/src/routes/(app)/[username]/+layout.svelte index ef0bd31..f4cebe7 100644 --- a/src/routes/(app)/[username]/+layout.svelte +++ b/src/routes/(app)/[username]/+layout.svelte @@ -7,7 +7,6 @@ import SetHandleModal from './components/ChangeHandleModal.svelte'; import ManageSubscriptionModal from './components/ManageSubscriptionModal.svelte'; import DeleteProfileModal from './components/DeleteProfileModal.svelte'; - import { env } from '$env/dynamic/public'; const { data, children }: { children: Snippet; data: PageData } = $props(); diff --git a/src/routes/(app)/[username]/components/ManageSubscriptionModal.svelte b/src/routes/(app)/[username]/components/ManageSubscriptionModal.svelte index f39033b..4d99dc5 100644 --- a/src/routes/(app)/[username]/components/ManageSubscriptionModal.svelte +++ b/src/routes/(app)/[username]/components/ManageSubscriptionModal.svelte @@ -57,14 +57,31 @@ {#if subscriptionInfo?.freeTrialExpirationDate}
Free Trial
-
-

You have access to memorable usernames or custom domains!

+
+

You have access to the following benefits:

+
    + {#if subscriptionInfo.benefits.has('non_numbered_username')} +
  • Claim a handle that doesn't end in a number.
  • + {/if} + {#if subscriptionInfo.benefits.has('custom_domain')} +
  • Use a custom domain for your handle.
  • + {/if} +

Trial Expires: {format(subscriptionInfo.freeTrialExpirationDate)}

+
+

+ You must purchase a subscription before the trial expires if you wish to keep your + custom domain or handle. +

+ +
{:else if !subscriptionInfo.benefits.size}
Weird Nerd