File tree Expand file tree Collapse file tree 10 files changed +55
-48
lines changed
organization-[organization]/domains
project-[region]-[project]
functions/function-[function]/domains
sites/site-[site]/domains Expand file tree Collapse file tree 10 files changed +55
-48
lines changed Original file line number Diff line number Diff line change 26
26
{#if verified === true }
27
27
<Badge variant =" secondary" type =" success" size =" xs" content =" Verified" />
28
28
{:else if verified === false }
29
- <Badge variant =" secondary" type =" error " size =" xs" content =" Verification failed" />
29
+ <Badge variant =" secondary" type =" warning " size =" xs" content =" Verification failed" />
30
30
{/if }
31
31
</Layout .Stack >
32
32
<Typography .Text variant =" m-400" >
Original file line number Diff line number Diff line change 40
40
{#if verified === true }
41
41
<Badge variant =" secondary" type =" success" size =" xs" content =" Verified" />
42
42
{:else if verified === false }
43
- <Badge variant =" secondary" type =" error " size =" xs" content =" Verification failed" />
43
+ <Badge variant =" secondary" type =" warning " size =" xs" content =" Verification failed" />
44
44
{/if }
45
45
</Layout .Stack >
46
46
<Typography .Text variant =" m-400" >
Original file line number Diff line number Diff line change 76
76
{#if verified === false }
77
77
<Badge
78
78
variant =" secondary"
79
- type =" error "
79
+ type =" warning "
80
80
size =" xs"
81
81
content =" Verification failed" />
82
82
{:else if verified === true }
Original file line number Diff line number Diff line change 11
11
import { consoleVariables } from ' $routes/(console)/store' ;
12
12
import type { Models } from ' @appwrite.io/console' ;
13
13
14
- export let show = false ;
15
- export let selectedDomain: Models .Domain ;
14
+ let {
15
+ show = $bindable (),
16
+ selectedDomain
17
+ }: {
18
+ show: boolean ;
19
+ selectedDomain: Models .ProxyRule ;
20
+ } = $props ();
21
+
16
22
const nameservers = $consoleVariables ?._APP_DOMAINS_NAMESERVERS .split (' ,' ) ?? [
17
23
' ns1.appwrite.io' ,
18
24
' ns2.appwrite.io'
19
25
];
20
26
21
- let error = null ;
27
+ let error = $state (null );
28
+
22
29
async function retryDomain() {
23
30
try {
24
31
const domain = await sdk .forConsole .domains .updateNameservers (selectedDomain .$id );
25
- show = false ;
26
32
if (domain .nameservers .toLowerCase () === ' appwrite' ) {
33
+ show = false ;
27
34
addNotification ({
28
35
type: ' success' ,
29
36
message: ` ${selectedDomain .domain } has been verified `
30
37
});
31
38
} else {
32
- addNotification ({
33
- type: ' error' ,
34
- message:
35
- ' Domain verification failed. Please check your domain settings or try again later'
36
- });
39
+ error =
40
+ ' Domain verification failed. Please check your domain settings or try again later' ;
37
41
}
38
42
await invalidate (Dependencies .DOMAINS );
39
43
trackEvent (Submit .DomainUpdateVerification );
43
47
}
44
48
}
45
49
46
- $ : if (! show ) {
47
- error = null ;
48
- }
50
+ $effect (() => {
51
+ if (! show ) {
52
+ error = null ;
53
+ }
54
+ });
49
55
</script >
50
56
51
57
<Modal title ="Retry verification" bind:show onSubmit ={retryDomain } bind:error >
Original file line number Diff line number Diff line change 10
10
import type { Models } from ' @appwrite.io/console' ;
11
11
import { page } from ' $app/state' ;
12
12
13
- export let show = false ;
14
- export let selectedProxyRule: Models .ProxyRule ;
13
+ let {
14
+ show = $bindable (false ),
15
+ selectedProxyRule
16
+ }: {
17
+ show: boolean ;
18
+ selectedProxyRule: Models .ProxyRule ;
19
+ } = $props ();
15
20
16
- let error = null ;
21
+ let error = $state ( null ) ;
17
22
async function retryProxyRule() {
18
23
try {
19
24
await sdk
32
37
}
33
38
}
34
39
35
- $ : if (! show ) {
36
- error = null ;
37
- }
40
+ $effect (() => {
41
+ if (! show ) {
42
+ error = null ;
43
+ }
44
+ });
38
45
</script >
39
46
40
47
<Modal title ="Retry verification" bind:show onSubmit ={retryProxyRule } bind:error >
Original file line number Diff line number Diff line change 61
61
</Typography .Text >
62
62
</Link >
63
63
{#if proxyRule .status === ' verifying' }
64
- <Badge
65
- variant =" secondary"
66
- type =" warning"
67
- content =" Verifying"
68
- size =" s" />
64
+ <Badge variant =" secondary" content =" Verifying" size =" s" />
69
65
{:else if proxyRule .status !== ' verified' }
70
66
<Badge
71
67
variant =" secondary"
72
- type =" error "
68
+ type =" warning "
73
69
content =" Verification failed"
74
70
size =" s" />
75
71
{/if }
Original file line number Diff line number Diff line change 17
17
show: boolean ;
18
18
selectedDomain: Models .ProxyRule ;
19
19
} = $props ();
20
- let error = $state (null );
21
20
21
+ let error = $state (null );
22
22
async function retryDomain() {
23
23
try {
24
24
await sdk
Original file line number Diff line number Diff line change 53
53
</Typography .Text >
54
54
</Link >
55
55
{#if domain .status === ' verifying' }
56
- <Badge
57
- variant =" secondary"
58
- type =" warning"
59
- content =" Verifying"
60
- size =" s" />
56
+ <Badge variant =" secondary" content =" Verifying" size =" s" />
61
57
{:else if domain .status !== ' verified' }
62
58
<Badge
63
59
variant =" secondary"
64
- type =" error "
60
+ type =" warning "
65
61
content =" Verification failed"
66
62
size =" s" />
67
63
{/if }
Original file line number Diff line number Diff line change 39
39
}
40
40
});
41
41
42
+ let error = $state (null );
42
43
let verified = $state (false );
43
44
44
45
async function retryDomain() {
45
46
try {
46
47
const domain = await sdk
47
48
.forProject (page .params .region , page .params .project )
48
49
.proxy .updateRuleVerification (selectedProxyRule .$id );
49
- await invalidate (Dependencies .SITES_DOMAINS );
50
- verified = domain .status === ' verified' ;
50
+
51
51
show = false ;
52
+ verified = domain .status === ' verified' ;
53
+ await invalidate (Dependencies .SITES_DOMAINS );
54
+
52
55
addNotification ({
53
56
type: ' success' ,
54
57
message: ` ${selectedProxyRule .domain } has been verified `
55
58
});
56
59
trackEvent (Submit .DomainUpdateVerification );
57
60
} catch (e ) {
58
- addNotification ({
59
- type: ' error' ,
60
- message:
61
- ' Domain verification failed. Please check your domain settings or try again later'
62
- });
61
+ error =
62
+ ' Domain verification failed. Please check your domain settings or try again later' ;
63
63
trackError (e , Submit .DomainUpdateVerification );
64
64
}
65
65
}
66
+
67
+ $effect (() => {
68
+ if (! show ) {
69
+ error = null ;
70
+ }
71
+ });
66
72
</script >
67
73
68
- <Modal title ="Retry verification" bind:show onSubmit ={retryDomain }>
74
+ <Modal title ="Retry verification" bind:show onSubmit ={retryDomain } bind:error >
69
75
<div >
70
76
<Tabs .Root variant =" secondary" let:root >
71
77
{#if isSubDomain && !! $regionalConsoleVariables ._APP_DOMAIN_TARGET_CNAME && $regionalConsoleVariables ._APP_DOMAIN_TARGET_CNAME !== ' localhost' }
Original file line number Diff line number Diff line change 62
62
</Link >
63
63
64
64
{#if rule .status === ' verifying' }
65
- <Badge
66
- variant =" secondary"
67
- type =" warning"
68
- content =" Verifying"
69
- size =" s" />
65
+ <Badge variant =" secondary" content =" Verifying" size =" s" />
70
66
{:else if rule .status !== ' verified' }
71
67
<Badge
72
68
variant =" secondary"
73
- type =" error "
69
+ type =" warning "
74
70
content =" Verification failed"
75
71
size =" s" />
76
72
{/if }
You can’t perform that action at this time.
0 commit comments