mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-07 14:46:41 +00:00
fix: sold out founders
This commit is contained in:
parent
34fe0fe43e
commit
e50e43c4c3
@ -190,7 +190,7 @@
|
|||||||
{#each items as item}
|
{#each items as item}
|
||||||
<MobileTable
|
<MobileTable
|
||||||
feature={item.name}
|
feature={item.name}
|
||||||
item={item.items[0]}
|
item={item.items[0] || ''}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</dl>
|
</dl>
|
||||||
@ -243,7 +243,7 @@
|
|||||||
{#each items as item}
|
{#each items as item}
|
||||||
<MobileTable
|
<MobileTable
|
||||||
feature={item.name}
|
feature={item.name}
|
||||||
item={item.items[1]}
|
item={item.items[1] || ''}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</dl>
|
</dl>
|
||||||
@ -297,7 +297,7 @@
|
|||||||
{#each items as item}
|
{#each items as item}
|
||||||
<MobileTable
|
<MobileTable
|
||||||
feature={item.name}
|
feature={item.name}
|
||||||
item={item.items[2]}
|
item={item.items[2] || ''}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -78,7 +78,8 @@
|
|||||||
|
|
||||||
<PricingCard
|
<PricingCard
|
||||||
name={`${PLAN_NAMES[SubscriptionType.Lifetime]}`}
|
name={`${PLAN_NAMES[SubscriptionType.Lifetime]}`}
|
||||||
{founderMembershipsRemaining}
|
qtyRemaining={founderMembershipsRemaining}
|
||||||
|
qtyMax={200}
|
||||||
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."
|
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']}
|
priceMonthly={[299, 'once, use forever']}
|
||||||
priceAnnually={[99, 'year (save 55%)']}
|
priceAnnually={[99, 'year (save 55%)']}
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
export let checkoutMonthURL = ''
|
export let checkoutMonthURL = ''
|
||||||
export let checkoutYearURL = ''
|
export let checkoutYearURL = ''
|
||||||
export let active = false
|
export let active = false
|
||||||
export let founderMembershipsRemaining = writable(0)
|
export let qtyMax = 0
|
||||||
|
export let qtyRemaining = writable(0)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -30,13 +31,16 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $founderMembershipsRemaining}
|
{#if qtyMax > 0}
|
||||||
<p
|
<p
|
||||||
class="animate-text bg-gradient-to-r from-teal-500 via-purple-500 to-orange-500 bg-clip-text text-transparent text-xl font-black"
|
class="animate-text bg-gradient-to-r from-teal-500 via-purple-500 to-orange-500 bg-clip-text text-transparent text-xl font-black"
|
||||||
>
|
>
|
||||||
<i class="fa-regular fa-clock"></i>
|
<i class="fa-regular fa-clock"></i>
|
||||||
{$founderMembershipsRemaining}/100 Remaining
|
{$qtyRemaining}/{qtyMax} Remaining
|
||||||
</p>
|
</p>
|
||||||
|
{#if $qtyRemaining <= 0}
|
||||||
|
<p class="text-error text-xl font-black">SOLD OUT</p>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<p class="mt-4 mb-8 text-sm leading-6 text-gray-300">{description}</p>
|
<p class="mt-4 mb-8 text-sm leading-6 text-gray-300">{description}</p>
|
||||||
@ -48,9 +52,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="mt-auto">
|
<div class="mt-auto">
|
||||||
{#if priceMonthly[0] > 0 && priceAnnually[0] > 0}
|
{#if priceAnnually[0] > 0}
|
||||||
<a
|
<a
|
||||||
href={checkoutMonthURL}
|
href={qtyMax > 0
|
||||||
|
? $qtyRemaining > 0
|
||||||
|
? checkoutMonthURL
|
||||||
|
: 'javascript:alert(`sold out`)'
|
||||||
|
: checkoutMonthURL}
|
||||||
class="mt-auto mb-4 block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 bg-white/10 text-white hover:bg-white/20 focus-visible:outline-white"
|
class="mt-auto mb-4 block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 bg-white/10 text-white hover:bg-white/20 focus-visible:outline-white"
|
||||||
>
|
>
|
||||||
<span class="text-xl font-bold tracking-tight text-white">
|
<span class="text-xl font-bold tracking-tight text-white">
|
||||||
@ -60,9 +68,14 @@
|
|||||||
/ {priceMonthly[1]}</span
|
/ {priceMonthly[1]}</span
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
|
{/if}
|
||||||
|
{#if priceMonthly[0] > 0}
|
||||||
<a
|
<a
|
||||||
href={checkoutYearURL}
|
href={qtyMax > 0
|
||||||
|
? $qtyRemaining > 0
|
||||||
|
? checkoutYearURL
|
||||||
|
: 'javascript:alert(`sold out`)'
|
||||||
|
: checkoutYearURL}
|
||||||
class="block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 bg-white/10 text-white hover:bg-white/20 focus-visible:outline-white"
|
class="block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 bg-white/10 text-white hover:bg-white/20 focus-visible:outline-white"
|
||||||
>
|
>
|
||||||
<span class="text-xl font-bold tracking-tight text-white">
|
<span class="text-xl font-bold tracking-tight text-white">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user