Modify the checkout widget to support subscriptions. Add usage-based billing toggle to sharing settings.
This commit is contained in:
@@ -8,24 +8,21 @@ import Euro from "util/Euro.svelte";
|
||||
{#if $user !== null}
|
||||
<div class="page_content">
|
||||
<section>
|
||||
{#if $user.subscription.type === "patreon"}
|
||||
{#if $user.subscription.id !== ""}
|
||||
<p>
|
||||
You already have a Patreon subscription active. You cannot use
|
||||
Prepaid while that subscription is active.
|
||||
You already have the {$user.subscription.name} plan active.
|
||||
Your account balance is <Euro
|
||||
amount={$user.balance_micro_eur}/>. Subscriptions are
|
||||
charged from this balance every day, use the form below to
|
||||
top it up or to switch to another plan.
|
||||
</p>
|
||||
{:else if $user.subscription.type === "prepaid"}
|
||||
<p>
|
||||
You already have a Prepaid subscription active. Your account
|
||||
balance is <Euro amount={$user.balance_micro_eur}/>. Use
|
||||
the form below to top up your balance.
|
||||
</p>
|
||||
<Checkout/>
|
||||
{:else}
|
||||
<p>
|
||||
Pick one of the subscription plans above to upgrade your
|
||||
account to premium.
|
||||
Pick a subscription plan to upgrade your account. Your
|
||||
account balance is <Euro amount={$user.balance_micro_eur}/>.
|
||||
</p>
|
||||
{/if}
|
||||
<Checkout/>
|
||||
</section>
|
||||
</div>
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user