mirror of
https://github.com/pockethost/pockethost.git
synced 2026-03-02 23:13:21 +00:00
Show all available plans
This commit is contained in:
@@ -3,11 +3,7 @@
|
||||
import { PLAN_NAMES, SubscriptionType } from '$shared'
|
||||
import { DISCORD_URL } from '$src/env'
|
||||
import { client } from '$src/pocketbase-client'
|
||||
import {
|
||||
isUserFounder,
|
||||
isUserLegacy,
|
||||
userSubscriptionType,
|
||||
} from '$util/stores'
|
||||
import { userSubscriptionType } from '$util/stores'
|
||||
import { onMount } from 'svelte'
|
||||
import { writable } from 'svelte/store'
|
||||
import Card from './Card.svelte'
|
||||
@@ -33,113 +29,102 @@
|
||||
<h2>Email: {client().user()?.email}</h2>
|
||||
</div>
|
||||
|
||||
{#if $isUserLegacy}
|
||||
<Card
|
||||
name={PLAN_NAMES[SubscriptionType.Legacy]}
|
||||
active={$userSubscriptionType === SubscriptionType.Legacy}
|
||||
features={[
|
||||
`Access to existing projects and legacy features`,
|
||||
`Unlimited (fair use) bandwith, storage, and CPU`,
|
||||
`Community support via Discord`,
|
||||
`FTP access to PocketBase data, hooks, migrations, and files`,
|
||||
`Run every version of PocketBase`,
|
||||
]}
|
||||
/>
|
||||
{:else}
|
||||
<Card
|
||||
name={PLAN_NAMES[SubscriptionType.Free]}
|
||||
active={$userSubscriptionType === SubscriptionType.Free}
|
||||
features={[
|
||||
`1 project`,
|
||||
`Unlimited (fair use) bandwith, storage, and CPU`,
|
||||
`Community support via Discord`,
|
||||
`FTP access to PocketBase data, hooks, migrations, and files`,
|
||||
`Run every version of PocketBase`,
|
||||
]}
|
||||
/>
|
||||
{/if}
|
||||
<Card
|
||||
name={PLAN_NAMES[SubscriptionType.Legacy]}
|
||||
active={$userSubscriptionType === SubscriptionType.Legacy}
|
||||
features={[
|
||||
`Access to existing projects and legacy features`,
|
||||
`Unlimited (fair use) bandwith, storage, and CPU`,
|
||||
`Community support via Discord`,
|
||||
`FTP access to PocketBase data, hooks, migrations, and files`,
|
||||
`Run every version of PocketBase`,
|
||||
]}
|
||||
/>
|
||||
|
||||
{#if [SubscriptionType.Free, SubscriptionType.Legacy].includes($userSubscriptionType)}
|
||||
<Card
|
||||
name={PLAN_NAMES[SubscriptionType.Premium]}
|
||||
active={$userSubscriptionType === SubscriptionType.Premium}
|
||||
features={[
|
||||
`Everything in the free tier`,
|
||||
`Unlimited projects`,
|
||||
`Priority support channel on Discord`,
|
||||
]}
|
||||
upgradable={[SubscriptionType.Free, SubscriptionType.Legacy].includes(
|
||||
$userSubscriptionType,
|
||||
)}
|
||||
prices={[
|
||||
{ title: `$20/mo`, link: `https://buy.stripe.com/fZe6sd8Mkfc30Kc4gg` },
|
||||
{
|
||||
title: `$199/yr (save 20%)`,
|
||||
link: `https://buy.stripe.com/bIYeYJbYwd3VdwY289`,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<p>
|
||||
We have a lot of ideas for premium features. Please check our <a
|
||||
class="link"
|
||||
target="_blank"
|
||||
href="https://discord.com/channels/1128192380500193370/1180219900107706409"
|
||||
>Discord discussion</a
|
||||
> to join in the conversation.
|
||||
</p></Card
|
||||
>
|
||||
{/if}
|
||||
<Card
|
||||
name={PLAN_NAMES[SubscriptionType.Free]}
|
||||
active={$userSubscriptionType === SubscriptionType.Free}
|
||||
features={[
|
||||
`1 project`,
|
||||
`Unlimited (fair use) bandwith, storage, and CPU`,
|
||||
`Community support via Discord`,
|
||||
`FTP access to PocketBase data, hooks, migrations, and files`,
|
||||
`Run every version of PocketBase`,
|
||||
]}
|
||||
/>
|
||||
|
||||
{#if [SubscriptionType.Free, SubscriptionType.Legacy, SubscriptionType.Lifetime].includes($userSubscriptionType) || $isUserFounder}
|
||||
<Card
|
||||
name={`🎉 🎈 Founder's Edition 🎊 🍄`}
|
||||
active={$isUserFounder}
|
||||
features={[
|
||||
`Everything in the Pro tier`,
|
||||
`Founder's badge on Discord`,
|
||||
`Official PocketHost mug or tee`,
|
||||
]}
|
||||
startLimit={100}
|
||||
limit={$founderMembershipsRemaining}
|
||||
upgradable
|
||||
prices={[
|
||||
{
|
||||
title: `$99/yr (50% savings)`,
|
||||
link: `https://buy.stripe.com/aEUdUF7Igfc350s28a`,
|
||||
},
|
||||
{
|
||||
title: `$299 lifetime`,
|
||||
link: `https://buy.stripe.com/7sIg2N6Ecgg70KcdQT`,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<p class="text-info text-xl">
|
||||
Super elite! The Founder's Edition is our way of saying thanks for
|
||||
supporting PocketHost in these early days.
|
||||
</p>
|
||||
</Card>
|
||||
{/if}
|
||||
<Card
|
||||
name={PLAN_NAMES[SubscriptionType.Premium]}
|
||||
active={$userSubscriptionType === SubscriptionType.Premium}
|
||||
upgradable
|
||||
features={[
|
||||
`Everything in the Hacker/free plan`,
|
||||
`Unlimited projects`,
|
||||
`Priority support channel on Discord`,
|
||||
]}
|
||||
prices={[
|
||||
{ title: `$20/mo`, link: `https://buy.stripe.com/fZe6sd8Mkfc30Kc4gg` },
|
||||
{
|
||||
title: `$199/yr (save 20%)`,
|
||||
link: `https://buy.stripe.com/bIYeYJbYwd3VdwY289`,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<p>
|
||||
We have a lot of ideas for premium features. Please check our <a
|
||||
class="link"
|
||||
target="_blank"
|
||||
href="https://discord.com/channels/1128192380500193370/1180219900107706409"
|
||||
>Discord discussion</a
|
||||
> to join in the conversation.
|
||||
</p></Card
|
||||
>
|
||||
|
||||
<Card
|
||||
name={`🎉 🎈 Founder's Edition 🎊 🍄`}
|
||||
active={$userSubscriptionType === SubscriptionType.Lifetime}
|
||||
features={[
|
||||
`Everything in the Pro tier`,
|
||||
`Founder's badge on Discord`,
|
||||
`Official PocketHost mug or tee`,
|
||||
]}
|
||||
startLimit={100}
|
||||
limit={$founderMembershipsRemaining}
|
||||
upgradable
|
||||
prices={[
|
||||
{
|
||||
title: `$99/yr (50% savings)`,
|
||||
link: `https://buy.stripe.com/aEUdUF7Igfc350s28a`,
|
||||
},
|
||||
{
|
||||
title: `$299 lifetime`,
|
||||
link: `https://buy.stripe.com/7sIg2N6Ecgg70KcdQT`,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<p class="text-info text-xl">
|
||||
Super elite! The Founder's Edition is our way of saying thanks for
|
||||
supporting PocketHost in these early days.
|
||||
</p>
|
||||
</Card>
|
||||
|
||||
<div>
|
||||
{#if $isUserLegacy}
|
||||
<div class="m-10 inline-block">
|
||||
<div class="card w-96 bg-base-100 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">Legacy Account Policy</h2>
|
||||
<p>
|
||||
Legacy accounts have access to existing projects and features, but
|
||||
cannot create new projects or use new features.
|
||||
</p>
|
||||
<p>
|
||||
If you upgrade to a paid plan and then downgrade again, you will
|
||||
still have access to your Legacy projects and features, but any
|
||||
new projects and features created on a paid plan will no longer
|
||||
work.
|
||||
</p>
|
||||
</div>
|
||||
<div class="m-10 inline-block">
|
||||
<div class="card w-96 bg-base-100 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">Legacy Account Policy</h2>
|
||||
<p>
|
||||
Legacy accounts have access to existing projects and features, but
|
||||
cannot create new projects or use new features.
|
||||
</p>
|
||||
<p>
|
||||
If you upgrade to a paid plan and then downgrade again, you will
|
||||
still have access to your Legacy projects and features, but any new
|
||||
projects and features created on a paid plan will no longer work.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="m-10 inline-block">
|
||||
<div class="card w-96 bg-base-100 shadow-xl">
|
||||
|
||||
Reference in New Issue
Block a user