31 lines
832 B
Svelte
31 lines
832 B
Svelte
<script lang="ts">
|
|
import Checkout from "layout/checkout/Checkout.svelte";
|
|
import { user } from "lib/UserStore";
|
|
import LoginRegister from "login/LoginRegister.svelte";
|
|
import Euro from "util/Euro.svelte";
|
|
</script>
|
|
|
|
{#if $user !== null}
|
|
<div class="page_content">
|
|
<section>
|
|
{#if $user.subscription.id !== ""}
|
|
<p>
|
|
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}
|
|
<p>
|
|
Pick a subscription plan to upgrade your account. Your
|
|
account balance is <Euro amount={$user.balance_micro_eur}/>.
|
|
</p>
|
|
{/if}
|
|
<Checkout/>
|
|
</section>
|
|
</div>
|
|
{:else}
|
|
<LoginRegister/>
|
|
{/if}
|