File tree Expand file tree Collapse file tree 13 files changed +54
-50
lines changed
organization-[organization]/domains
project-[region]-[project]
functions/function-[function]/domains
add-domain/verify-[domain]
add-domain/verify-[domain]
sites/site-[site]/domains
add-domain/verify-[domain] Expand file tree Collapse file tree 13 files changed +54
-50
lines changed Original file line number Diff line number Diff line change 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 >
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 }
Original file line number Diff line number Diff line change 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' }
Original file line number Diff line number Diff line change 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 ({
Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff line change 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 );
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 );
Original file line number Diff line number Diff line change 5151
5252 async function retryProxyRule() {
5353 error = null ;
54+ verified = undefined ;
5455
5556 try {
5657 const apexDomain = getApexDomain (selectedProxyRule .domain );
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 ;
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change 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 );
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 );
Original file line number Diff line number Diff line change 5151
5252 async function retryDomain() {
5353 error = null ;
54+ verified = undefined ;
5455
5556 try {
5657 const apexDomain = getApexDomain (selectedProxyRule .domain );
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 ;
Original file line number Diff line number Diff line change 4545 title: ' Domain' ,
4646 type: ' string' ,
4747 format: ' string' ,
48- width: { min: 300 , max: 550 }
48+ width: { min: 600 }
4949 },
5050 {
5151 id: ' updated' ,
You can’t perform that action at this time.
0 commit comments