From 1dd15b17cba2a896265064fbdb543cc706e02381 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 28 Feb 2025 11:55:01 +0100 Subject: [PATCH] domains flow, fixes to sites --- .../domains/+page.svelte | 31 ++-------- .../domains/add-domain/+page.svelte | 56 +++++-------------- .../certificateInfoModal.svelte | 0 .../deleteCertificateModal.svelte | 0 .../disabledPage.svelte} | 0 .../disabledPage.ts} | 0 .../domains/domain-[domain]/header.svelte | 10 ++-- .../domains/domain-[domain]/table.svelte | 12 +--- .../domains/recordsCard.svelte | 41 ++++++++++---- .../deployments/deleteDeploymentModal.svelte | 7 ++- 10 files changed, 62 insertions(+), 95 deletions(-) rename src/routes/(console)/organization-[organization]/domains/domain-[domain]/{certificates => (certificates)}/certificateInfoModal.svelte (100%) rename src/routes/(console)/organization-[organization]/domains/domain-[domain]/{certificates => (certificates)}/deleteCertificateModal.svelte (100%) rename src/routes/(console)/organization-[organization]/domains/domain-[domain]/{certificates/+page.svelte => (certificates)/disabledPage.svelte} (100%) rename src/routes/(console)/organization-[organization]/domains/domain-[domain]/{certificates/+page.ts => (certificates)/disabledPage.ts} (100%) diff --git a/src/routes/(console)/organization-[organization]/domains/+page.svelte b/src/routes/(console)/organization-[organization]/domains/+page.svelte index ea30ac199..2eeff4d7d 100644 --- a/src/routes/(console)/organization-[organization]/domains/+page.svelte +++ b/src/routes/(console)/organization-[organization]/domains/+page.svelte @@ -7,7 +7,6 @@ import { toLocaleDateTime } from '$lib/helpers/date'; import Container from '$lib/layout/container.svelte'; import { protocol } from '$routes/(console)/store.js'; - import type { Models } from '@appwrite.io/console'; import { IconDotsHorizontal, IconExternalLink, @@ -17,7 +16,6 @@ } from '@appwrite.io/pink-icons-svelte'; import { ActionMenu, - Badge, Card, Empty, Icon, @@ -30,20 +28,15 @@ import { queries } from '$lib/components/filters'; import SearchQuery from '$lib/components/searchQuery.svelte'; import { app } from '$lib/stores/app'; + import type { Domain } from '$lib/sdk/domains'; export let data; let showDelete = false; let showRetry = false; - let selectedDomain: Models.Domain = null; + let selectedDomain: Domain = null; $: console.log(data.domains); - - // TODO: replace status once backend is fixed - // created - Verification Failed - // verified - Verification OK , Certificate OK - // verifying - Verifiacitok OK - // unverified - Verificaiton OK , Certificate Failed @@ -81,24 +74,12 @@ - {#if !domain.verified} - - {:else if domain.status === 'veryfing'} - - {/if} {domain?.registrar || '-'} {domain?.nameservers || '-'} - {domain?.expiry || '-'} + + {domain?.expiry ? toLocaleDateTime(domain.expiry) : '-'} {domain.renewal ? toLocaleDateTime(domain.renewal) : '-'} @@ -199,6 +180,6 @@ {/if} -{#if showRetry} + diff --git a/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte b/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte index 812ea1dca..35508e113 100644 --- a/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte +++ b/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte @@ -1,35 +1,27 @@ @@ -57,12 +56,7 @@ {:else if column.id === 'value'} -
- -
+
{:else if column.id === 'ttl'} diff --git a/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte b/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte index 1831e9cc3..f1c362267 100644 --- a/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte +++ b/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte @@ -1,11 +1,22 @@
@@ -14,6 +25,7 @@ {domain.domain} + @@ -25,17 +37,22 @@ Type - Name Value + - - CNAME - {domain.domain} - - {globalThis?.location?.origin} - - + {#each nameservers as nameserver} + + NS + {nameserver} + + + + + + + + + {/each} diff --git a/src/routes/(console)/project-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte b/src/routes/(console)/project-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte index 9ac0ca240..d1651ae95 100644 --- a/src/routes/(console)/project-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte +++ b/src/routes/(console)/project-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte @@ -1,5 +1,7 @@