-
-
- {currentTier.name}
-
- {#if $organization.billingPlan !== 'tier-0' && $organization.billingTrialDays}
-
FREE TRIAL
- {/if}
+
+ Your current project plan. For more information on Appwrite plans,
+
+
+
+
+
+ {currentTier.name}
+
+ {#if $organization.billingPlan !== 'tier-0' && $organization.billingTrialDays}
+
FREE TRIAL
+ {/if}
+
+
+
+ {#if $organization.billingPlan !== 'tier-0' && $organization.billingTrialDays}
+ Esimated total:
+ {/if}
+ ${currentTier.price}
+
-
-
- {#if $organization.billingPlan !== 'tier-0' && $organization.billingTrialDays}
- Esimated total:
- {/if}
- ${currentTier.price}
-
-
-
-
- Billing period: {toLocaleDate($organization.billingCurrentInvoiceDate)} - {toLocaleDate(
- $organization.billingNextInvoiceDate
- )}
-
-
-
-
-
-
-
-
-
+
+
+ Billing period: {toLocaleDate($organization?.billingCurrentInvoiceDate)} - {toLocaleDate(
+ $organization?.billingNextInvoiceDate
+ )}
+
+
+
+
+
+
+
+
+
+{/if}
diff --git a/src/routes/console/organization-[organization]/wizard/step2.svelte b/src/routes/console/organization-[organization]/wizard/step2.svelte
index 67fec33be..bb4b54fab 100644
--- a/src/routes/console/organization-[organization]/wizard/step2.svelte
+++ b/src/routes/console/organization-[organization]/wizard/step2.svelte
@@ -3,27 +3,14 @@
import { Pill } from '$lib/elements';
import { WizardStep } from '$lib/layout';
import { sdk } from '$lib/stores/sdk';
+ import { onMount } from 'svelte';
import { createProject } from './store';
+ import type { RegionList } from '$lib/sdk/billing';
- const regions = [
- { name: 'eu-central-1', label: 'EU (Frankfurt)', flag: 'de', disabled: false },
- { name: 'eu-west-1', label: 'EU (Ireland)', flag: 'ie', disabled: true },
- { name: 'eu-west-2', label: 'EU (London)', flag: 'gb', disabled: true },
- { name: 'eu-west-3', label: 'EU (Paris)', flag: 'fr', disabled: true },
- { name: 'eu-north-1', label: 'EU (Stockholm)', flag: 'se', disabled: true },
- { name: 'eu-south-1', label: 'EU (Milan)', flag: 'it', disabled: true },
- { name: 'us-east-1', label: 'US (Virginia)', flag: 'us', disabled: true },
- { name: 'us-east-2', label: 'US (Ohio)', flag: 'us', disabled: true },
- { name: 'us-west-1', label: 'US (N. California)', flag: 'us', disabled: true },
- { name: 'us-west-2', label: 'US (Oregon)', flag: 'us', disabled: true },
- { name: 'ap-northeast-1', label: 'Asia Pacific (Tokyo)', flag: 'jp', disabled: true },
- { name: 'ap-northeast-2', label: 'Asia Pacific (Seoul)', flag: 'kr', disabled: true },
- { name: 'ap-northeast-3', label: 'Asia Pacific (Osaka-Local)', flag: 'jp', disabled: true },
- { name: 'ap-southeast-1', label: 'Asia Pacific (Singapore)', flag: 'sg', disabled: true },
- { name: 'ap-southeast-2', label: 'Asia Pacific (Sydney)', flag: 'au', disabled: true },
- { name: 'ap-south-1', label: 'Asia Pacific (Mumbai)', flag: 'in', disabled: true },
- { name: 'ca-central-1', label: 'Canada (Central)', flag: 'ca', disabled: true }
- ];
+ let regions: RegionList;
+ onMount(async () => {
+ regions = await sdk.forConsole.billing.listRegions();
+ });
function getFlag(country: string) {
let flag = sdk.forProject.avatars.getFlag(country, 80, 60)?.toString();
@@ -39,50 +26,51 @@
Choose a deployment region for your project. This region cannot be changed.
+ {#if regions?.total}
+
+ {#each regions.regions as region}
+ -
+
+
+ {#if region.disabled}
+
})
+
{region.name}
+
+
+ Notify me
+
+ {:else}
+
})
+ {region.name}
+ {/if}
+
+
+
+ {/each}
+
-
- {#each regions as region}
- -
-
-
- {#if region.disabled}
-
})
-
{region.label}
-
-
- Notify me
-
- {:else}
-
})
- {region.label}
- {/if}
-
-
-
- {/each}
-
-
-
- Edge Network is enabled on all regions. For more details, check out our Documentation.
-
+
+ Edge Network is enabled on all regions. For more details, check out our Documentation.
+
+ {/if}
diff --git a/src/routes/console/wizard/cloudOrganization/step4.svelte b/src/routes/console/wizard/cloudOrganization/step4.svelte
index 03f84f387..30c4346fd 100644
--- a/src/routes/console/wizard/cloudOrganization/step4.svelte
+++ b/src/routes/console/wizard/cloudOrganization/step4.svelte
@@ -2,7 +2,7 @@
import { Pill } from '$lib/elements';
import { toLocaleDate } from '$lib/helpers/date';
import { WizardStep } from '$lib/layout';
- import { tierToPlan } from '$lib/stores/billing';
+ import { getCreditCardImage, tierToPlan } from '$lib/stores/billing';
import { sdk } from '$lib/stores/sdk';
import { createOrganization } from './store';
@@ -52,7 +52,16 @@
{:then card}
-