diff --git a/src/lib/components/modal.svelte b/src/lib/components/modal.svelte
index 137463f0f..05da1e24f 100644
--- a/src/lib/components/modal.svelte
+++ b/src/lib/components/modal.svelte
@@ -8,6 +8,7 @@
export let size: 'small' | 'big' = null;
export let warning = false;
export let error: string = null;
+ export let closable = true;
const dispatch = createEventDispatcher();
const transitionFly: FlyParams = {
@@ -31,8 +32,10 @@
}
};
const closeModal = () => {
- show = false;
- dispatch('close');
+ if (closable) {
+ show = false;
+ dispatch('close');
+ }
};
/**
@@ -65,14 +68,16 @@
-
+ {#if closable}
+
+ {/if}
{#if error}
diff --git a/src/routes/console/__layout-intro.svelte b/src/routes/console/__layout-intro.svelte
index 161b1b74a..3f77101ba 100644
--- a/src/routes/console/__layout-intro.svelte
+++ b/src/routes/console/__layout-intro.svelte
@@ -19,40 +19,49 @@
async function handle(event = null) {
await organizationList.load();
- if (!$organization) {
- await organization.load($organizationList.teams[0].$id);
- await memberList.load($organization.$id, '', 100, 0);
+ if ($organizationList?.total) {
+ if (!$organization) {
+ await organization.load($organizationList.teams[0].$id);
+ await memberList.load($organization.$id, '', 100, 0);
+ }
+ updateLayout({
+ navigate: event,
+ title: $organization?.name ?? `${$organizationList.teams[0].name}`,
+ titleDropdown: $organizationList.teams,
+ level: 0,
+ customBase: '',
+ breadcrumbs: {
+ title: `${$organization.name}`,
+ href: 'console'
+ },
+ tabs: [
+ {
+ href: 'console',
+ title: 'Projects'
+ },
+ {
+ href: 'console/members',
+ title: 'Members'
+ },
+ {
+ href: 'console/settings',
+ title: 'Settings'
+ }
+ ]
+ });
+ } else {
+ $newOrgModal = true;
+ closable = false;
}
- updateLayout({
- navigate: event,
- title: $organization?.name ?? `${$organizationList.teams[0].name}`,
- titleDropdown: $organizationList.teams,
- level: 0,
- customBase: '',
- breadcrumbs: {
- title: `${$organization.name}`,
- href: 'console'
- },
- tabs: [
- {
- href: 'console',
- title: 'Projects'
- },
- {
- href: 'console/members',
- title: 'Members'
- },
- {
- href: 'console/settings',
- title: 'Settings'
- }
- ]
- });
}
+ let closable = true;
+
organization.subscribe((org) => {
handle();
- memberList.load(org.$id, '', 100, 0);
+ if (org?.$id) {
+ memberList.load(org.$id, '', 100, 0);
+ }
});
@@ -60,15 +69,15 @@
Appwrite - Console
-{#if $organization}
-
-
-
-
+
+
+
+
+ {#if $organization}
-
-
-{/if}
+ {/if}
+
+
-
+
diff --git a/src/routes/console/_createOrganization.svelte b/src/routes/console/_createOrganization.svelte
index ab728957b..6a28491cb 100644
--- a/src/routes/console/_createOrganization.svelte
+++ b/src/routes/console/_createOrganization.svelte
@@ -10,7 +10,7 @@
import { goto } from '$app/navigation';
export let show = false;
-
+ export let closable = true;
const dispatch = createEventDispatcher();
let name: string;
@@ -40,7 +40,7 @@