mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Fix creating org on self-hosted
This commit is contained in:
1 parent
ba66fdfb95
commit
57ec375a66
1 file changed
+18
-11
@@ -9,6 +9,10 @@
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
import { BottomSheet } from '$lib/components';
|
||||
import { isSmallViewport } from '$lib/stores/viewport';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { goto } from '$app/navigation';
|
||||
import { base } from '$app/paths';
|
||||
import { newOrgModal } from '$lib/stores/organization';
|
||||
|
||||
type Project = {
|
||||
name: string;
|
||||
@@ -63,6 +67,12 @@
|
||||
let organisationBottomSheetOpen = false;
|
||||
let projectsBottomSheetOpen = false;
|
||||
|
||||
function createOrg() {
|
||||
if (isCloud) {
|
||||
goto(`${base}/create-organization`);
|
||||
} else newOrgModal.set(true);
|
||||
}
|
||||
|
||||
const switchOrganization = {
|
||||
top: {
|
||||
title: 'Switch Organization',
|
||||
@@ -76,7 +86,7 @@
|
||||
{
|
||||
name: 'Create organization',
|
||||
leadingIcon: IconPlus,
|
||||
href: `/console/create-organization`
|
||||
onClick: createOrg
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -109,7 +119,7 @@
|
||||
{
|
||||
name: 'Create organization',
|
||||
leadingIcon: IconPlus,
|
||||
href: `/console/create-organization`
|
||||
onClick: createOrg
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -224,10 +234,9 @@
|
||||
<div class="separator" use:melt={$separatorOrganizations} />
|
||||
<div use:melt={$itemOrganizations}>
|
||||
<ActionMenu.Root>
|
||||
<ActionMenu.Item.Anchor
|
||||
href="/console/create-organization"
|
||||
<ActionMenu.Item.Button
|
||||
leadingIcon={IconPlusSm}
|
||||
title="">Create organization</ActionMenu.Item.Anchor
|
||||
on:click={createOrg}>Create organization</ActionMenu.Item.Button
|
||||
></ActionMenu.Root>
|
||||
</div>
|
||||
</div>
|
||||
@@ -236,9 +245,8 @@
|
||||
<div class="separator" use:melt={$separatorOrganizations} />
|
||||
<div use:melt={$itemOrganizations}>
|
||||
<ActionMenu.Root>
|
||||
<ActionMenu.Item.Anchor
|
||||
href="/console/create-organization"
|
||||
leadingIcon={IconPlusSm}>Create organization</ActionMenu.Item.Anchor
|
||||
<ActionMenu.Item.Button leadingIcon={IconPlusSm} on:click={createOrg}
|
||||
>Create organization</ActionMenu.Item.Button
|
||||
></ActionMenu.Root>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -254,9 +262,8 @@
|
||||
<div class="separator" use:melt={$separatorOrganizations} />
|
||||
<div use:melt={$itemOrganizations}>
|
||||
<ActionMenu.Root>
|
||||
<ActionMenu.Item.Anchor
|
||||
href="/console/create-organization"
|
||||
leadingIcon={IconPlusSm}>Create organization</ActionMenu.Item.Anchor
|
||||
<ActionMenu.Item.Button leadingIcon={IconPlusSm} on:click={createOrg}
|
||||
>Create organization</ActionMenu.Item.Button
|
||||
></ActionMenu.Root>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user