Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@9c55755",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@8e384ac",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bbad65f",
"@appwrite.io/pink-legacy": "^1.0.3",
Expand Down
24 changes: 19 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
let showDelete = false;
let showRetry = false;
let selectedDomain: Models.Domain = null;

const isDomainVerified = (domain: Models.Domain) => {
return domain.nameservers.toLowerCase() === 'appwrite';
};
</script>

<Container>
Expand Down Expand Up @@ -90,7 +86,7 @@
{domain.domain}
</Typography.Text>
</Link>
{#if !isDomainVerified(domain)}
{#if !domain.verified}
<Badge
variant="secondary"
type="error"
Expand Down Expand Up @@ -132,7 +128,7 @@

<svelte:fragment slot="tooltip" let:toggle>
<ActionMenu.Root>
{#if !isDomainVerified(domain)}
{#if !domain.verified}
<ActionMenu.Item.Button
leadingIcon={IconRefresh}
on:click={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
});

await invalidate(Dependencies.DOMAINS);
const verified = domain.nameservers.toLowerCase() === 'appwrite';
if (verified) {
if (domain.verified) {
await goto(backPage);
addNotification({
type: 'success',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
retryVerification: () => void;
} = $props();

const isDomainVerified = $derived(domain.nameservers.toLowerCase() === 'appwrite');

const metrics = $derived([
{
value: isDomainVerified ? 'Verified' : 'Not verified',
value: domain.verified ? 'Verified' : 'Not verified',
description: 'Status'
},
{
Expand Down Expand Up @@ -56,9 +54,9 @@
<Status
--font-size-s="var(--font-size-xs)"
label={metric.value.toString()}
status={isDomainVerified ? 'complete' : 'pending'} />
status={domain.verified ? 'complete' : 'pending'} />

{#if !isDomainVerified}
{#if !domain.verified}
<Link size="s" on:click={retryVerification}>Retry</Link>
{/if}
</Layout.Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
async function verifyStatus() {
try {
domain = await sdk.forConsole.domains.updateNameservers({ domainId: domain.$id });
verified = domain.nameservers.toLowerCase() === 'appwrite';
if (verified) {
if (domain.verified) {
addNotification({
type: 'success',
message: 'Domain verified successfully'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@

await Promise.all([invalidate(Dependencies.DOMAIN), invalidate(Dependencies.DOMAINS)]);

const verified = domain?.nameservers.toLowerCase() === 'appwrite';
if (!verified) {
if (!domain.verified) {
throw new Error(
'Domain verification failed. Please check your domain settings or try again later'
);
Expand Down
Loading