diff --git a/src/routes/(console)/project-[project]/sites/site-[site]/domains/+page.svelte b/src/routes/(console)/project-[project]/sites/site-[site]/domains/+page.svelte index ca266002f..68ac65598 100644 --- a/src/routes/(console)/project-[project]/sites/site-[site]/domains/+page.svelte +++ b/src/routes/(console)/project-[project]/sites/site-[site]/domains/+page.svelte @@ -43,29 +43,16 @@ - - - - - - Custom domain - - (showPreviewDomainModal = true)}> - Preview domain - - - - + {#if data.domains.total} diff --git a/src/routes/(console)/project-[project]/sites/site-[site]/domains/add-domain/+page.svelte b/src/routes/(console)/project-[project]/sites/site-[site]/domains/add-domain/+page.svelte index b7e65b1de..bdc498a7a 100644 --- a/src/routes/(console)/project-[project]/sites/site-[site]/domains/add-domain/+page.svelte +++ b/src/routes/(console)/project-[project]/sites/site-[site]/domains/add-domain/+page.svelte @@ -5,14 +5,25 @@ import { Wizard } from '$lib/layout'; import { addNotification } from '$lib/stores/notifications'; import { sdk } from '$lib/stores/sdk'; - import { Fieldset, Layout, Tooltip, Icon, Alert, Input } from '@appwrite.io/pink-svelte'; + import { + Fieldset, + Layout, + Tooltip, + Icon, + Alert, + Input, + Divider, + Typography, + Badge, + Card + } from '@appwrite.io/pink-svelte'; import { goto, invalidate } from '$app/navigation'; import { Dependencies } from '$lib/constants'; import { sortBranches } from '$lib/stores/vcs'; import { organization } from '$lib/stores/organization'; import { consoleVariables } from '$routes/(console)/store'; import InputDomain from '$lib/elements/forms/inputDomain.svelte'; - import { IconInfo } from '@appwrite.io/pink-icons-svelte'; + import { IconGlobeAlt, IconInfo } from '@appwrite.io/pink-icons-svelte'; import { LabelCard } from '$lib/components'; import { writable } from 'svelte/store'; import ConnectRepoModal from '../../../(components)/connectRepoModal.svelte'; @@ -28,7 +39,8 @@ let isSubmitting = writable(false); let showConnectRepo = false; - let behaviour: 'REDIRECT' | 'CREATE' = 'CREATE'; + let behaviour: 'REDIRECT' | 'BRANCH' | 'ACTIVE' = 'ACTIVE'; + let step: 'add' | 'verify' = 'add'; let domain = ''; let redirect: string = null; let statusCode: number = null; @@ -146,11 +158,36 @@ } - +
- -
- - -
- - - - Connect this domain to your active deployment and configure the linked Git - branch as needed. - - - Automatically forward traffic from this domain to another URL of your choice. - - - - {#if behaviour === 'CREATE'} -
- - {#if data.site?.providerRepositoryId} - {@const sortedBranches = sortBranches(data.branches.branches)} - {@const options = sortedBranches.map((branch) => ({ - label: branch.name, - value: branch.name - }))} - - - {#if !data.branches?.total} - - No branches found in the selected repository. Create a - branch to see it here. - - {/if} - - {:else} - - - -

- The domain will be connected to your active deployment. - Connect your Git repository to link a production branch. -

-
- -
-
-
- {/if} -
-
- - - {:else if behaviour === 'REDIRECT'} -
- - - - - - Redirect this domain. Domains added to your project will be - listed here. - - - - + placeholder="appwrite.example.com" /> + + {#if behaviour === 'BRANCH'} + {#if data.site?.providerRepositoryId} + {@const sortedBranches = sortBranches(data.branches.branches)} + {@const options = sortedBranches.map((branch) => ({ + label: branch.name, + value: branch.name + }))} + + + {#if !data.branches?.total} + + No branches found in the selected repository. Create a + branch to see it here. + + {/if} + + {/if} + {:else if behaviour === 'REDIRECT'} + + + + + Redirect this domain. Domains added to your project will be + listed here. + + + + + {/if} + + + +
- {/if} -
+ + {:else if step === 'verify'} + + + + + + + {domain} + + + + + + {/if}
+