From fac1beb7d830b59a9e7bcf6dc604060d45730185 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 14 May 2025 12:09:10 -0400 Subject: [PATCH] refactor: buy immich (#18289) * refactor: buy container * refactor: buy immich --- .../purchasing/purchase-content.svelte | 87 +++++++++---------- web/src/routes/(user)/buy/+page.svelte | 24 ++--- 2 files changed, 52 insertions(+), 59 deletions(-) diff --git a/web/src/lib/components/shared-components/purchasing/purchase-content.svelte b/web/src/lib/components/shared-components/purchasing/purchase-content.svelte index b46bdcb5e3e..637ed188691 100644 --- a/web/src/lib/components/shared-components/purchasing/purchase-content.svelte +++ b/web/src/lib/components/shared-components/purchasing/purchase-content.svelte @@ -4,6 +4,7 @@ import { purchaseStore } from '$lib/stores/purchase.store'; import { handleError } from '$lib/utils/handle-error'; import { activateProduct, getActivationKey } from '$lib/utils/license-utils'; + import { Heading } from '@immich/ui'; import { t } from 'svelte-i18n'; import UserPurchaseOptionCard from './individual-purchase-option-card.svelte'; import ServerPurchaseOptionCard from './server-purchase-option-card.svelte'; @@ -36,52 +37,50 @@ }; -
-
- {#if showTitle} -

- {$t('purchase_option_title')} -

- {/if} +
+ {#if showTitle} + + {$t('purchase_option_title')} + + {/if} - {#if showMessage} -
-

- {$t('purchase_panel_info_1')} -

-
-

- {$t('purchase_panel_info_2')} -

-
-
- {/if} - -
- - + {#if showMessage} +
+

+ {$t('purchase_panel_info_1')} +

+
+

+ {$t('purchase_panel_info_2')} +

+
+ {/if} -
-

{$t('purchase_input_suggestion')}

-
- - -
-
+
+ + +
+ +
+

{$t('purchase_input_suggestion')}

+
+ + +
diff --git a/web/src/routes/(user)/buy/+page.svelte b/web/src/routes/(user)/buy/+page.svelte index eb0194c4472..e8bfd5451be 100644 --- a/web/src/routes/(user)/buy/+page.svelte +++ b/web/src/routes/(user)/buy/+page.svelte @@ -3,13 +3,13 @@ import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte'; import LicenseActivationSuccess from '$lib/components/shared-components/purchasing/purchase-activation-success.svelte'; import LicenseContent from '$lib/components/shared-components/purchasing/purchase-content.svelte'; + import SupporterBadge from '$lib/components/shared-components/side-bar/supporter-badge.svelte'; import { AppRoute } from '$lib/constants'; + import { purchaseStore } from '$lib/stores/purchase.store'; + import { Alert, Container, Stack } from '@immich/ui'; + import { mdiAlertCircleOutline } from '@mdi/js'; import { t } from 'svelte-i18n'; import type { PageData } from './$types'; - import Icon from '$lib/components/elements/icon.svelte'; - import { mdiAlertCircleOutline } from '@mdi/js'; - import { purchaseStore } from '$lib/stores/purchase.store'; - import SupporterBadge from '$lib/components/shared-components/side-bar/supporter-badge.svelte'; interface Props { data: PageData; @@ -21,16 +21,10 @@ -
-
+ + {#if data.isActivated === false} - + {/if} {#if $isPurchased} @@ -46,6 +40,6 @@ }} /> {/if} -
-
+ +