mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
initial commit
This commit is contained in:
1 parent
ca08b538c9
commit
a9f0da8f2d
8 files changed
+140
-4
No files matched your search
@@ -5,6 +5,7 @@
|
||||
import PaginationInline from './paginationInline.svelte';
|
||||
|
||||
export let hidePages = false;
|
||||
export let cardOnly = false;
|
||||
</script>
|
||||
|
||||
<article class="card u-grid u-cross-center u-width-full-line common-section">
|
||||
@@ -18,7 +19,9 @@
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div class="u-flex u-margin-block-start-32 u-main-space-between">
|
||||
<p class="text">Total results: 0</p>
|
||||
<PaginationInline limit={1} offset={0} sum={0} {hidePages} />
|
||||
</div>
|
||||
{#if !cardOnly}
|
||||
<div class="u-flex u-margin-block-start-32 u-main-space-between">
|
||||
<p class="text">Total results: 0</p>
|
||||
<PaginationInline limit={1} offset={0} sum={0} {hidePages} />
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,16 @@
|
||||
<script>
|
||||
import { Container } from '$lib/layout';
|
||||
import AvailableCredit from './availableCredit.svelte';
|
||||
import BillingAddress from './billingAddress.svelte';
|
||||
import PaymentHistory from './paymentHistory.svelte';
|
||||
import PaymentMethods from './paymentMethods.svelte';
|
||||
import PaymentSummary from './paymentSummary.svelte';
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<PaymentSummary />
|
||||
<PaymentHistory />
|
||||
<PaymentMethods />
|
||||
<BillingAddress />
|
||||
<AvailableCredit />
|
||||
</Container>
|
||||
@@ -0,0 +1,45 @@
|
||||
<script lang="ts">
|
||||
import { CardGrid, Heading } from '$lib/components';
|
||||
import { Button, FormList, InputText } from '$lib/elements/forms';
|
||||
|
||||
let credit = 0;
|
||||
let coupon: string = null;
|
||||
|
||||
async function redeem() {
|
||||
const response = await fetch('/v1/account/credit', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
coupon
|
||||
})
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
credit = data.sum;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<CardGrid>
|
||||
<Heading tag="h2" size="6">Available Credit</Heading>
|
||||
|
||||
<p class="text">Appwrite credit will automatically be applied to your next invoice.</p>
|
||||
<svelte:fragment slot="aside">
|
||||
<p class="text u-bold">Credit balance: <span class="u-success">{credit}</span></p>
|
||||
|
||||
<FormList>
|
||||
<InputText
|
||||
placeholder="Coupon code"
|
||||
id="coupon"
|
||||
label="Add credit"
|
||||
bind:value={coupon} />
|
||||
</FormList>
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
<Button secondary on:click={redeem} event="redeem_code">Redeem</Button>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { CardGrid, Empty, Heading } from '$lib/components';
|
||||
</script>
|
||||
|
||||
<CardGrid>
|
||||
<Heading tag="h2" size="6">Billing Address</Heading>
|
||||
|
||||
<p class="text">
|
||||
View or update your billing address. This address will appear on your invoice.
|
||||
</p>
|
||||
<svelte:fragment slot="aside">
|
||||
<Empty>
|
||||
<p class="text">Add a billing address</p>
|
||||
</Empty>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
import { CardGrid, EmptySearch, Heading } from '$lib/components';
|
||||
</script>
|
||||
|
||||
<CardGrid>
|
||||
<Heading tag="h2" size="6">Payment History</Heading>
|
||||
|
||||
<p class="text">
|
||||
Transaction history for this Organization. Download invoices for more details about your
|
||||
payments.
|
||||
</p>
|
||||
<svelte:fragment slot="aside">
|
||||
<EmptySearch cardOnly>
|
||||
<p class="text u-text-center">
|
||||
You have no payment history. After you receive your first invoice, you'll see it
|
||||
here.
|
||||
</p>
|
||||
</EmptySearch>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
@@ -0,0 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { CardGrid, Empty, Heading } from '$lib/components';
|
||||
</script>
|
||||
|
||||
<CardGrid>
|
||||
<Heading tag="h2" size="6">Payment Methods</Heading>
|
||||
|
||||
<p class="text">View or update your organization payment methods here.</p>
|
||||
<svelte:fragment slot="aside">
|
||||
<Empty>
|
||||
<p class="text">Add a payment method</p>
|
||||
</Empty>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { Box, CardGrid, Heading } from '$lib/components';
|
||||
</script>
|
||||
|
||||
<CardGrid>
|
||||
<Heading tag="h2" size="6">Payment Summary</Heading>
|
||||
|
||||
<p class="text">An overview of your upcoming payments.</p>
|
||||
<svelte:fragment slot="aside">
|
||||
<Box>
|
||||
<svelte:fragment slot="title">
|
||||
<h6 class="u-bold u-trim-1">PLACEHOLDER PLAN</h6>
|
||||
</svelte:fragment>
|
||||
<p class="u-trim-1">X projects</p>
|
||||
</Box>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
@@ -35,6 +35,11 @@
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings'
|
||||
},
|
||||
{
|
||||
href: `${path}/billing`,
|
||||
event: 'billing',
|
||||
title: 'Billing'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user