chore: refactor founder/flounder pricing cards

This commit is contained in:
Ben Allfree 2025-01-10 04:17:20 -08:00
parent 2d15e46c02
commit 39a435fd1c
4 changed files with 32 additions and 30 deletions

View File

@ -1,7 +1,7 @@
<script lang="ts">
import { PLAN_NAMES, SubscriptionType } from 'pockethost/common'
import { stats, userStore } from '$util/stores'
import PricingCard from '$src/routes/(static)/pricing/PricingCard.svelte'
import PricingCard from '$components/PricingCard.svelte'
export let priceMonthly: [number, string?, number?] = [
359,

View File

@ -0,0 +1,27 @@
<script lang="ts">
import { PLAN_NAMES, SubscriptionType } from 'pockethost/common'
import { userStore } from '$util/stores'
import PricingCard from './PricingCard.svelte'
</script>
<PricingCard
name={`${PLAN_NAMES[SubscriptionType.Founder]}`}
qtyRemaining={0}
qtyMax={100}
description="Super elite! The Founder's Edition is our way of saying thanks for supporting PocketHost in these early days. Choose between lifetime and annual options."
priceMonthly={[299, 'once, use forever']}
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}"
features={[
`Everything in the ${PLAN_NAMES[SubscriptionType.Premium]} tier`,
'Unlimited instances',
'Unlimited bandwidth',
'Unlimited storage & files',
`Private #onlyfounders Discord channel`,
`Priority support`,
`Commemorative Founder's badge`,
`PocketHost t-shirt`,
`Girlfriend`,
]}
/>

View File

@ -3,7 +3,6 @@
import { userStore } from '$util/stores'
import Fa from 'svelte-fa'
import { onMount, onDestroy } from 'svelte'
import { writable } from 'svelte/store'
export let name = ''
export let description = ''
export let priceMonthly: [number, string?, number?] = [0, '']
@ -23,8 +22,6 @@
const comingSoon = startDate && startDate > new Date()
$: qtySold = qtyMax - qtyRemaining
let countdown = ''
let countdownInterval: ReturnType<typeof setInterval>

View File

@ -1,10 +1,8 @@
<script lang="ts">
import PricingCard from '$src/routes/(static)/pricing/PricingCard.svelte'
import { PLAN_NAMES, SubscriptionType } from 'pockethost/common'
import PricingTable from './PricingTable.svelte'
import { userStore } from '$util/stores'
import FlounderCard from '$src/routes/(app)/account/FlounderCard.svelte'
import Testimonials from '$src/components/Testimonials.svelte'
import FounderCard from '$components/FounderCard.svelte'
import FlounderCard from '$components/FlounderCard.svelte'
import Testimonials from '$components/Testimonials.svelte'
</script>
<!-- Flex them up -->
@ -17,27 +15,7 @@
<div class="text-xl text-center pb-5">Rare deals</div>
<div class="flex flex-wrap gap-6 justify-center">
<div class="w-96">
<PricingCard
name={`${PLAN_NAMES[SubscriptionType.Founder]}`}
qtyRemaining={0}
qtyMax={100}
description="Super elite! The Founder's Edition is our way of saying thanks for supporting PocketHost in these early days. Choose between lifetime and annual options."
priceMonthly={[299, 'once, use forever']}
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}"
features={[
`Everything in the ${PLAN_NAMES[SubscriptionType.Premium]} tier`,
'Unlimited instances',
'Unlimited bandwidth',
'Unlimited storage & files',
`Private #onlyfounders Discord channel`,
`Priority support`,
`Commemorative Founder's badge`,
`PocketHost t-shirt`,
`Girlfriend`,
]}
/>
<FounderCard />
</div>
<div class="w-96">