-
{getInitials($user.name)}
+ {getInitials($user.name || $user.email)}
{previousQuestion}
@@ -229,7 +229,7 @@
-
+
- {$user.name}
+ {$user.name || 'User'}
diff --git a/src/routes/(console)/account/updateName.svelte b/src/routes/(console)/account/updateName.svelte
index 72c521e6c..06b42fcf9 100644
--- a/src/routes/(console)/account/updateName.svelte
+++ b/src/routes/(console)/account/updateName.svelte
@@ -12,7 +12,7 @@
let name: string = null;
onMount(async () => {
- name ??= $user.name;
+ name ??= $user.name ?? '';
});
async function updateName() {
diff --git a/src/routes/(console)/create-organization/+page.svelte b/src/routes/(console)/create-organization/+page.svelte
index 621ba3a00..a9a92035e 100644
--- a/src/routes/(console)/create-organization/+page.svelte
+++ b/src/routes/(console)/create-organization/+page.svelte
@@ -170,7 +170,7 @@
trackEvent(Submit.OrganizationCreate, {
plan: tierToPlan(billingPlan)?.name,
- budget_cap_enabled: !!billingBudget,
+ budget_cap_enabled: billingBudget !== null,
members_invited: collaborators?.length
});
diff --git a/src/routes/(console)/organization-[organization]/+page.svelte b/src/routes/(console)/organization-[organization]/+page.svelte
index 76607b429..91f9fbfbd 100644
--- a/src/routes/(console)/organization-[organization]/+page.svelte
+++ b/src/routes/(console)/organization-[organization]/+page.svelte
@@ -28,16 +28,16 @@
import { ID, Region } from '@appwrite.io/console';
import { openImportWizard } from '../project-[project]/settings/migrations/(import)';
import { readOnly } from '$lib/stores/billing';
- import type { RegionList } from '$lib/sdk/billing';
import { onMount } from 'svelte';
import { organization } from '$lib/stores/organization';
import { canWriteProjects } from '$lib/stores/roles';
import { checkPricingRefAndRedirect } from '$lib/helpers/pricingRedirect';
+ import { regions as regionsStore } from '$routes/(console)/organization-[organization]/store';
export let data;
- let addOrganization = false;
let showCreate = false;
+ let addOrganization = false;
const getPlatformInfo = (platform: string) => {
let name: string, icon: string;
@@ -85,6 +85,7 @@
if (isCloud) wizard.start(Create);
else showCreate = true;
}
+
$: $registerCommands([
{
label: 'Create project',
@@ -120,17 +121,16 @@
}
};
- let regions: RegionList;
onMount(async () => {
if (isCloud) {
- regions = await sdk.forConsole.billing.listRegions();
+ const regions = await sdk.forConsole.billing.listRegions();
+ regionsStore.set(regions);
checkPricingRefAndRedirect($page.url.searchParams);
}
});
function findRegion(project: Models.Project) {
- const region = regions.regions.find((region) => region.$id === project.region);
- return region;
+ return $regionsStore?.regions?.find((region) => region.$id === project.region);
}
@@ -198,7 +198,7 @@
{/if}
- {#if isCloud && regions}
+ {#if isCloud && $regionsStore?.regions}
{@const region = findRegion(project)}
{region?.name}
diff --git a/src/routes/(console)/organization-[organization]/billing/+page.svelte b/src/routes/(console)/organization-[organization]/billing/+page.svelte
index c370fbf31..2d3772358 100644
--- a/src/routes/(console)/organization-[organization]/billing/+page.svelte
+++ b/src/routes/(console)/organization-[organization]/billing/+page.svelte
@@ -1,7 +1,6 @@
-
+
{runtimeDetail.name}
- {#if runtimeDetail.name.toLowerCase() === 'deno'}
- New
- {/if}
+
+
+
diff --git a/src/routes/(console)/account/deleteAccount.svelte b/src/routes/(console)/account/deleteAccount.svelte
index 168d289e4..863839c66 100644
--- a/src/routes/(console)/account/deleteAccount.svelte
+++ b/src/routes/(console)/account/deleteAccount.svelte
@@ -18,10 +18,10 @@