|
1 | 1 | <script lang="ts"> |
| 2 | + import { goto } from '$app/navigation'; |
2 | 3 | import { base } from '$app/paths'; |
3 | 4 | import { page } from '$app/state'; |
4 | 5 | import { AvatarGroup, Tab, Tabs } from '$lib/components'; |
|
14 | 15 | readOnly, |
15 | 16 | tierToPlan |
16 | 17 | } from '$lib/stores/billing'; |
17 | | - import { members, newMemberModal, type Organization } from '$lib/stores/organization'; |
| 18 | + import { |
| 19 | + members, |
| 20 | + newMemberModal, |
| 21 | + newOrgModal, |
| 22 | + type Organization |
| 23 | + } from '$lib/stores/organization'; |
18 | 24 | import { |
19 | 25 | canSeeBilling, |
20 | 26 | canSeeProjects, |
|
23 | 29 | isOwner |
24 | 30 | } from '$lib/stores/roles'; |
25 | 31 | import { GRACE_PERIOD_OVERRIDE, isCloud } from '$lib/system'; |
26 | | - import { IconGithub, IconPlus } from '@appwrite.io/pink-icons-svelte'; |
| 32 | + import { IconGithub, IconPlus, IconPlusSm } from '@appwrite.io/pink-icons-svelte'; |
27 | 33 | import { Badge, Icon, Layout, Tooltip, Typography } from '@appwrite.io/pink-svelte'; |
28 | 34 |
|
29 | 35 | let areMembersLimited: boolean = $state(false); |
|
93 | 99 | {#if organization?.$id} |
94 | 100 | <Cover> |
95 | 101 | <svelte:fragment slot="header"> |
96 | | - <span class="u-flex u-cross-center u-gap-8 u-min-width-0"> |
| 102 | + <Layout.Stack direction="row" alignItems="center" gap="m" class="u-min-width-0"> |
97 | 103 | <Typography.Title color="--fgcolor-neutral-primary" size="xl" truncate> |
98 | 104 | {organization.name} |
99 | 105 | </Typography.Title> |
|
114 | 120 | </svelte:fragment> |
115 | 121 | </Tooltip> |
116 | 122 | {/if} |
117 | | - </span> |
| 123 | + <Button |
| 124 | + secondary |
| 125 | + size="xs" |
| 126 | + on:click={() => |
| 127 | + isCloud ? goto(`${base}/create-organization`) : newOrgModal.set(true)}> |
| 128 | + <Icon icon={IconPlusSm} size="m" /> |
| 129 | + </Button> |
| 130 | + </Layout.Stack> |
118 | 131 | <div class="u-margin-inline-start-auto"> |
119 | 132 | <Layout.Stack direction="row" alignItems="center" gap="xl"> |
120 | 133 | {#if $members.total > 1} |
|
0 commit comments