fixed PricingCard styling for Premium + Founder users (#360)

This commit is contained in:
Rafal Potasz 2024-01-19 21:12:33 +00:00 committed by GitHub
parent e50e43c4c3
commit 6c2f8e8ca0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@
import MobileTable from '$components/tables/pricing-table/MobileTable.svelte'
import { PLAN_NAMES, SubscriptionType } from '$shared'
import { DISCORD_URL, DOCS_URL } from '$src/env'
import { userSubscriptionType } from '$util/stores'
import { userSubscriptionType, isUserFounder } from '$util/stores'
type ItemValue = '1' | 'Unlimited' | 'YesBlock' | 'NoBlock'
@ -137,13 +137,14 @@
<div class="rounded-lg ring-1 ring-transparent"></div>
{/if}
{#if $userSubscriptionType === SubscriptionType.Premium}
{#if $userSubscriptionType === SubscriptionType.Premium && !$isUserFounder}
<div class="rounded-lg ring-2 ring-primary"></div>
{:else}
<div class="rounded-lg ring-1 ring-transparent"></div>
{/if}
{#if $userSubscriptionType === SubscriptionType.Lifetime}
{#if $userSubscriptionType === SubscriptionType.Lifetime ||
(SubscriptionType.Premium && $isUserFounder)}
<div class="rounded-lg ring-2 ring-primary"></div>
{:else}
<div class="rounded-lg ring-1 ring-transparent"></div>

View File

@ -5,7 +5,7 @@
import { client } from '$src/pocketbase-client'
import FAQSection from '$src/routes/account/FAQSection.svelte'
import PricingCard from '$src/routes/account/PricingCard.svelte'
import { isUserLegacy, userStore, userSubscriptionType } from '$util/stores'
import { isUserLegacy, userStore, userSubscriptionType, isUserFounder } from '$util/stores'
import { onMount } from 'svelte'
import { writable } from 'svelte/store'
@ -73,7 +73,7 @@
priceAnnually={[199, 'year (save 20%)']}
checkoutMonthURL="https://store.pockethost.io/checkout/buy/8e7cfb35-846a-4fd6-adcb-c2db5589275d?checkout[custom][user_id]={$userStore?.id}"
checkoutYearURL="https://store.pockethost.io/checkout/buy/96e4ab4b-f646-4fb2-b830-5584db983e73?checkout[custom][user_id]={$userStore?.id}"
active={$userSubscriptionType === SubscriptionType.Premium}
active={$userSubscriptionType === SubscriptionType.Premium && !$isUserFounder}
/>
<PricingCard
@ -85,7 +85,7 @@
priceAnnually={[99, 'year (save 55%)']}
checkoutMonthURL="https://store.pockethost.io/checkout/buy/e71cbfb5-cec3-4745-97a7-d877f6776503?checkout[custom][user_id]={$userStore?.id}"
checkoutYearURL="https://store.pockethost.io/checkout/buy/e5660329-5b99-4ed6-8f36-0d387803e1d6?checkout[custom][user_id]={$userStore?.id}"
active={$userSubscriptionType === SubscriptionType.Lifetime}
active={$userSubscriptionType === SubscriptionType.Lifetime || (SubscriptionType.Premium && $isUserFounder)}
/>
</div>