Skip to content

Commit 49164aa

Browse files
committed
feedback
1 parent fe32cf7 commit 49164aa

File tree

13 files changed

+54
-50
lines changed

13 files changed

+54
-50
lines changed

src/lib/components/domains/recordTable.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@
115115
</svelte:fragment>
116116
<Table.Row.Base {root}>
117117
<Table.Cell column="type" {root}>{variant.toUpperCase()}</Table.Cell>
118-
<Table.Cell column="name" {root}>{subdomain || '@'}</Table.Cell>
118+
<Table.Cell column="name" {root}>
119+
<InteractiveText variant="copy" isVisible text={subdomain || '@'} />
120+
</Table.Cell>
119121
<Table.Cell column="value" {root}>
120122
<InteractiveText variant="copy" isVisible text={setTarget()} />
121123
</Table.Cell>
@@ -139,16 +141,14 @@
139141
{#if variant === 'cname' && !subdomain}
140142
{#if isCloud}
141143
<Alert.Inline>
142-
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain,
143-
CNAME record is only supported by certain providers. If yours doesn't, please verify
144-
using
144+
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain, CNAME
145+
record is only supported by certain providers. If yours doesn't, please verify using
145146
<Link variant="muted" on:click={onNavigateToNameservers}>nameservers</Link> instead.
146147
</Alert.Inline>
147148
{:else if aTabVisible || aaaaTabVisible}
148149
<Alert.Inline>
149-
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain,
150-
CNAME record is only supported by certain providers. If yours doesn't, please verify
151-
using
150+
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain, CNAME
151+
record is only supported by certain providers. If yours doesn't, please verify using
152152
{#if aTabVisible}
153153
<Link variant="muted" on:click={onNavigateToA}>A record</Link>
154154
{#if aaaaTabVisible}

src/routes/(console)/organization-[organization]/domains/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
variant="secondary"
9696
type="error"
9797
content="Not verified"
98-
size="s" />
98+
size="xs" />
9999
{/if}
100100
</Layout.Stack>
101101
{:else if column.id === 'registrar'}

src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
await invalidate(Dependencies.DOMAINS);
2929
const verified = domain.nameservers.toLowerCase() === 'appwrite';
3030
if (verified) {
31+
await goto(backPage);
3132
addNotification({
3233
type: 'success',
3334
message: 'Domain verified successfully'
3435
});
35-
await goto(backPage);
3636
}
3737
} catch (error) {
3838
addNotification({

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,20 @@
3232
const domain = await sdk.forConsole.domains.updateNameservers({
3333
domainId: selectedDomain.$id
3434
});
35-
if (domain.nameservers.toLowerCase() === 'appwrite') {
36-
show = false;
37-
addNotification({
38-
type: 'success',
39-
message: 'Domain verified successfully'
40-
});
41-
} else {
42-
error =
43-
'Domain verification failed. Please check your domain settings or try again later';
44-
}
35+
4536
await Promise.all([invalidate(Dependencies.DOMAIN), invalidate(Dependencies.DOMAINS)]);
37+
38+
const verified = domain?.nameservers.toLowerCase() === 'appwrite';
39+
if (!verified) {
40+
throw new Error(
41+
'Domain verification failed. Please check your domain settings or try again later'
42+
);
43+
}
44+
show = false;
45+
addNotification({
46+
type: 'success',
47+
message: 'Domain verified successfully'
48+
});
4649
trackEvent(Submit.DomainUpdateVerification);
4750
} catch (e) {
4851
error = e.message;

src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/verify-[domain]/+page.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
}
5656
5757
async function verify() {
58+
verified = undefined;
59+
5860
try {
5961
const apexDomain = getApexDomain(proxyRule.domain);
6062
const domain = data.domainsList.domains.find((d) => d.domain === apexDomain);
@@ -73,15 +75,15 @@
7375
.forProject(page.params.region, page.params.project)
7476
.proxy.updateRuleVerification({ ruleId });
7577
76-
verified = true;
78+
await Promise.all([
79+
invalidate(Dependencies.DOMAINS),
80+
invalidate(Dependencies.FUNCTION_DOMAINS)
81+
]);
82+
await goto(routeBase);
7783
addNotification({
7884
type: 'success',
7985
message: 'Domain verified successfully'
8086
});
81-
82-
await goto(routeBase);
83-
await invalidate(Dependencies.DOMAINS);
84-
await invalidate(Dependencies.FUNCTION_DOMAINS);
8587
} catch (error) {
8688
verified = false;
8789
isSubmitting.set(false);

src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/retryDomainModal.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
5252
async function retryProxyRule() {
5353
error = null;
54+
verified = undefined;
5455
5556
try {
5657
const apexDomain = getApexDomain(selectedProxyRule.domain);
@@ -69,14 +70,12 @@
6970
.forProject(page.params.region, page.params.project)
7071
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
7172
72-
verified = true;
73+
await invalidate(Dependencies.FUNCTION_DOMAINS);
74+
show = false;
7375
addNotification({
7476
type: 'success',
7577
message: 'Domain verified successfully'
7678
});
77-
78-
await invalidate(Dependencies.FUNCTION_DOMAINS);
79-
show = false;
8079
trackEvent(Submit.DomainUpdateVerification);
8180
} catch (e) {
8281
verified = false;

src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export const columns = writable<Column[]>([
77
title: 'Domain',
88
type: 'string',
99
format: 'string',
10-
width: { min: 300 }
10+
width: { min: 600 }
1111
},
1212

1313
{
1414
id: 'target',
1515
title: 'Target',
1616
type: 'string',
17-
width: { min: 120, max: 400 }
17+
width: { min: 160, max: 400 }
1818
},
1919

2020
{

src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/verify-[domain]/+page.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
}
5656
5757
async function verify() {
58+
verified = undefined;
59+
5860
try {
5961
const apexDomain = getApexDomain(proxyRule.domain);
6062
const domain = data.domainsList.domains.find((d) => d.domain === apexDomain);
@@ -72,14 +74,12 @@
7274
.forProject(page.params.region, page.params.project)
7375
.proxy.updateRuleVerification({ ruleId });
7476
75-
verified = true;
77+
await invalidate(Dependencies.DOMAINS);
78+
await goto(routeBase);
7679
addNotification({
7780
type: 'success',
7881
message: 'Domain verified successfully'
7982
});
80-
81-
await goto(routeBase);
82-
await invalidate(Dependencies.DOMAINS);
8383
} catch (error) {
8484
verified = false;
8585
isSubmitting.set(false);

src/routes/(console)/project-[region]-[project]/settings/domains/retryDomainModal.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
5252
async function retryDomain() {
5353
error = null;
54+
verified = undefined;
5455
5556
try {
5657
const apexDomain = getApexDomain(selectedProxyRule.domain);
@@ -69,14 +70,12 @@
6970
.forProject(page.params.region, page.params.project)
7071
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
7172
72-
verified = true;
73+
await invalidate(Dependencies.DOMAINS);
74+
show = false;
7375
addNotification({
7476
type: 'success',
7577
message: 'Domain verified successfully'
7678
});
77-
78-
await invalidate(Dependencies.DOMAINS);
79-
show = false;
8079
trackEvent(Submit.DomainUpdateVerification);
8180
} catch (e) {
8281
verified = false;

src/routes/(console)/project-[region]-[project]/settings/domains/table.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
title: 'Domain',
4646
type: 'string',
4747
format: 'string',
48-
width: { min: 300, max: 550 }
48+
width: { min: 600 }
4949
},
5050
{
5151
id: 'updated',

0 commit comments

Comments
 (0)