Skip to content

Commit 4819d8d

Browse files
Merge pull request #2735 from appwrite/fix-hide-org-create
2 parents 22ccd17 + 886460b commit 4819d8d

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/lib/profiles/index.svelte.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export type Profile = {
4545
showGeneralAvailability: boolean;
4646
showConnectProjectOnToolbar: boolean;
4747
showProgressBar: boolean;
48+
showCreateOrganization: boolean;
4849
services: {
4950
'get-started': boolean;
5051
overview: boolean;
@@ -108,6 +109,7 @@ export const base: Profile = {
108109
showGeneralAvailability: true,
109110
showConnectProjectOnToolbar: true,
110111
showProgressBar: true,
112+
showCreateOrganization: true,
111113
services: {
112114
'get-started': true,
113115
overview: true,
@@ -199,6 +201,7 @@ export const studio: Profile = {
199201
showGeneralAvailability: false,
200202
showConnectProjectOnToolbar: false,
201203
showProgressBar: false,
204+
showCreateOrganization: false,
202205
services: {
203206
'get-started': false,
204207
overview: false,

src/routes/(console)/organization-[organization]/header.svelte

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@
138138
</Tooltip>
139139
{/if}
140140
{/if}
141-
<Button
142-
secondary
143-
icon
144-
size="xs"
145-
on:click={() =>
146-
isCloud ? goto(`${base}/create-organization`) : newOrgModal.set(true)}>
147-
<Icon icon={IconPlusSm} size="m" />
148-
</Button>
141+
{#if resolvedProfile.showCreateOrganization}
142+
<Button
143+
secondary
144+
icon
145+
size="xs"
146+
on:click={() =>
147+
isCloud ? goto(`${base}/create-organization`) : newOrgModal.set(true)}>
148+
<Icon icon={IconPlusSm} size="m" />
149+
</Button>
150+
{/if}
149151
</Layout.Stack>
150152
<div class="u-margin-inline-start-auto">
151153
<Layout.Stack direction="row" alignItems="center" gap="xl">

0 commit comments

Comments
 (0)