mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(web): show supporter badge for account less than 14 days (#12058)
This commit is contained in:
parent
edf47dbbd0
commit
f4371578f5
1 changed files with 38 additions and 40 deletions
|
@ -76,48 +76,46 @@
|
||||||
<LicenseModal onClose={() => (isOpen = false)} />
|
<LicenseModal onClose={() => (isOpen = false)} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if getAccountAge() > 14}
|
<div class="hidden md:block license-status pl-4 text-sm">
|
||||||
<div class="hidden md:block license-status pl-4 text-sm">
|
{#if $isPurchased && $preferences.purchase.showSupportBadge}
|
||||||
{#if $isPurchased && $preferences.purchase.showSupportBadge}
|
<button
|
||||||
<button
|
on:click={() => goto(`${AppRoute.USER_SETTINGS}?isOpen=user-purchase-settings`)}
|
||||||
on:click={() => goto(`${AppRoute.USER_SETTINGS}?isOpen=user-purchase-settings`)}
|
class="w-full"
|
||||||
class="w-full"
|
type="button"
|
||||||
type="button"
|
>
|
||||||
>
|
<SupporterBadge />
|
||||||
<SupporterBadge />
|
</button>
|
||||||
</button>
|
{:else if !$isPurchased && showBuyButton && getAccountAge() > 14}
|
||||||
{:else if !$isPurchased && showBuyButton}
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
on:click={openPurchaseModal}
|
||||||
on:click={openPurchaseModal}
|
on:mouseover={onButtonHover}
|
||||||
on:mouseover={onButtonHover}
|
on:mouseleave={() => (hoverButton = false)}
|
||||||
on:mouseleave={() => (hoverButton = false)}
|
on:focus={onButtonHover}
|
||||||
on:focus={onButtonHover}
|
on:blur={() => (hoverButton = false)}
|
||||||
on:blur={() => (hoverButton = false)}
|
class="p-2 flex justify-between place-items-center place-content-center border border-immich-primary/20 dark:border-immich-dark-primary/10 mt-2 rounded-lg shadow-md dark:bg-immich-dark-primary/10 w-full"
|
||||||
class="p-2 flex justify-between place-items-center place-content-center border border-immich-primary/20 dark:border-immich-dark-primary/10 mt-2 rounded-lg shadow-md dark:bg-immich-dark-primary/10 w-full"
|
>
|
||||||
>
|
<div class="flex justify-between w-full place-items-center place-content-center">
|
||||||
<div class="flex justify-between w-full place-items-center place-content-center">
|
<div class="flex place-items-center place-content-center gap-1">
|
||||||
<div class="flex place-items-center place-content-center gap-1">
|
<div class="h-6 w-6">
|
||||||
<div class="h-6 w-6">
|
<ImmichLogo noText />
|
||||||
<ImmichLogo noText />
|
|
||||||
</div>
|
|
||||||
<p class="flex text-immich-primary dark:text-immich-dark-primary font-medium">
|
|
||||||
{$t('purchase_button_buy_immich')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<Icon
|
|
||||||
path={mdiInformationOutline}
|
|
||||||
class="flex text-immich-primary dark:text-immich-dark-primary font-medium"
|
|
||||||
size="18"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="flex text-immich-primary dark:text-immich-dark-primary font-medium">
|
||||||
|
{$t('purchase_button_buy_immich')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
|
||||||
{/if}
|
<div>
|
||||||
</div>
|
<Icon
|
||||||
{/if}
|
path={mdiInformationOutline}
|
||||||
|
class="flex text-immich-primary dark:text-immich-dark-primary font-medium"
|
||||||
|
size="18"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<Portal target="body">
|
<Portal target="body">
|
||||||
{#if showMessage}
|
{#if showMessage}
|
||||||
|
|
Loading…
Reference in a new issue