mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: org wizard and more
This commit is contained in:
1 parent
7375a59dbe
commit
9d19382102
3 files changed
+50
-13
No files matched your search
@@ -41,18 +41,22 @@
|
||||
|
||||
<div class="choice-item-content">
|
||||
<div class:u-hide={!showLabel} class="choice-item-title">
|
||||
{label}
|
||||
<div class="u-flex u-cross-child-center u-gap-4">
|
||||
<span>
|
||||
{label}
|
||||
</span>
|
||||
|
||||
{#if tooltip}
|
||||
<button class="tooltip" aria-label="variables info">
|
||||
<span class="icon-info" aria-hidden="true" />
|
||||
<span class="tooltip-popup" role="tooltip">
|
||||
<p class="text">
|
||||
{tooltip}
|
||||
</p>
|
||||
</span>
|
||||
</button>
|
||||
{/if}
|
||||
{#if tooltip}
|
||||
<button class="tooltip" aria-label="variables info">
|
||||
<span class="icon-info" aria-hidden="true" />
|
||||
<span class="tooltip-popup" role="tooltip">
|
||||
<p class="text">
|
||||
{tooltip}
|
||||
</p>
|
||||
</span>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{#if $$slots}
|
||||
<p class="choice-item-paragraph"><slot /></p>
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
$createOrganization = {
|
||||
id: null,
|
||||
name: null,
|
||||
tier: Tier['PREMIUM']
|
||||
tier: Tier['PREMIUM'],
|
||||
payment: null
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { FormList, InputRadio, InputText } from '$lib/elements/forms';
|
||||
import { Button, Form, FormList, InputRadio, InputText } from '$lib/elements/forms';
|
||||
import InputChoice from '$lib/elements/forms/inputChoice.svelte';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
import { createOrganization } from './store';
|
||||
import { Collapsible, CollapsibleItem } from '$lib/components';
|
||||
|
||||
let methods = [];
|
||||
let name: string;
|
||||
let promo: string;
|
||||
|
||||
onMount(async () => {
|
||||
methods = await sdk.forConsole.billing.listPaymentMethods('TEST');
|
||||
@@ -15,6 +17,14 @@
|
||||
$createOrganization.payment = methods[0].id;
|
||||
}
|
||||
});
|
||||
|
||||
async function redeem() {
|
||||
try {
|
||||
// await sdk.forConsole.billing.redeemPromoCode(promo);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<WizardStep>
|
||||
@@ -56,6 +66,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Collapsible>
|
||||
<CollapsibleItem>
|
||||
<svelte:fragment slot="title">Add credit</svelte:fragment>
|
||||
<svelte:fragment slot="subtitle">(optional)</svelte:fragment>
|
||||
<p class="text">
|
||||
Appwrite credit will automatically be applied to your next invoice.
|
||||
</p>
|
||||
<Form onSubmit={redeem}>
|
||||
<FormList>
|
||||
<InputText
|
||||
id="credit"
|
||||
label="Promo code"
|
||||
placeholder="APPWRITE123"
|
||||
bind:value={promo} />
|
||||
<Button secondary submit>Redeem</Button>
|
||||
</FormList>
|
||||
</Form>
|
||||
</CollapsibleItem>
|
||||
</Collapsible>
|
||||
|
||||
<div class="u-sep-block-start" />
|
||||
|
||||
<InputChoice type="switchbox" id="budget" label="Enable budget cap" tooltip="lorem ipsum">
|
||||
<p class="text">
|
||||
Restrict your resource usage by setting a budget cap. <a
|
||||
|
||||
Reference in new issue
Block a user