mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: add credit modal
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal title="Add credits" headerDivider={false} onSubmit={redeem}>
|
||||
<Modal bind:show title="Add credits" headerDivider={false} onSubmit={redeem} size="big">
|
||||
Apply Appwrite credits to your organization.
|
||||
|
||||
<FormList>
|
||||
@@ -42,7 +42,7 @@
|
||||
</FormList>
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button text>Cancel</Button>
|
||||
<Button text on:click={() => (show = false)}>Cancel</Button>
|
||||
<Button submit>Add credits</Button>
|
||||
</svelte:fragment>
|
||||
</Modal>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import AddCreditWizard from './addCreditWizard.svelte';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import AddCreditModal from './addCreditModal.svelte';
|
||||
|
||||
let offset = 0;
|
||||
let creditList: CreditList = {
|
||||
@@ -33,6 +34,7 @@
|
||||
|
||||
function handleCredits() {
|
||||
if ($organization?.paymentMethodId || $organization?.backupPaymentMethodId) {
|
||||
console.log('askdjsad');
|
||||
show = true;
|
||||
} else {
|
||||
console.log('test');
|
||||
@@ -103,3 +105,5 @@
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
|
||||
<AddCreditModal bind:show />
|
||||
|
||||
Reference in New Issue
Block a user