Skip to content

Commit 69fadc3

Browse files
committed
Use updated rule for label
1 parent e93a775 commit 69fadc3

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
);
4545
const showNSTab = isCloud;
4646
47+
let proxyRule = $derived(data.proxyRule);
4748
let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>(getDefaultTab());
4849
let routeBase = `${base}/project-${page.params.region}-${page.params.project}/functions/function-${page.params.function}/domains`;
4950
let verified: boolean | undefined = $state(undefined);
@@ -55,7 +56,7 @@
5556
5657
async function verify() {
5758
try {
58-
const apexDomain = getApexDomain(data.proxyRule.domain);
59+
const apexDomain = getApexDomain(proxyRule.domain);
5960
const domain = data.domainsList.domains.find((d) => d.domain === apexDomain);
6061
6162
if (isCloud && domain) {
@@ -68,7 +69,7 @@
6869
}
6970
7071
try {
71-
await sdk
72+
proxyRule = await sdk
7273
.forProject(page.params.region, page.params.project)
7374
.proxy.updateRuleVerification({ ruleId });
7475
@@ -97,7 +98,7 @@
9798
.forProject(page.params.region, page.params.project)
9899
.proxy.deleteRule({ ruleId });
99100
}
100-
await goto(`${routeBase}/add-domain?domain=${data.proxyRule.domain}`);
101+
await goto(`${routeBase}/add-domain?domain=${proxyRule.domain}`);
101102
}
102103
</script>
103104

@@ -114,7 +115,7 @@
114115
<Icon icon={IconGlobeAlt} color="--fgcolor-neutral-primary" />
115116

116117
<Typography.Text variation="m-500" color="--fgcolor-neutral-primary">
117-
{data.proxyRule.domain}
118+
{proxyRule.domain}
118119
</Typography.Text>
119120
</Layout.Stack>
120121
<Button secondary on:click={back}>Change</Button>
@@ -163,15 +164,15 @@
163164
{#if selectedTab === 'nameserver'}
164165
<NameserverTable
165166
{verified}
166-
domain={data.proxyRule.domain}
167-
ruleStatus={data.proxyRule.status} />
167+
domain={proxyRule.domain}
168+
ruleStatus={proxyRule.status} />
168169
{:else}
169170
<RecordTable
170171
{verified}
171172
service="functions"
172173
variant={selectedTab}
173-
domain={data.proxyRule.domain}
174-
ruleStatus={data.proxyRule.status}
174+
domain={proxyRule.domain}
175+
ruleStatus={proxyRule.status}
175176
onNavigateToNameservers={() => (selectedTab = 'nameserver')}
176177
onNavigateToA={() => (selectedTab = 'a')}
177178
onNavigateToAAAA={() => (selectedTab = 'aaaa')} />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
6767
try {
68-
await sdk
68+
selectedProxyRule = await sdk
6969
.forProject(page.params.region, page.params.project)
7070
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
7171

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
);
4545
const showNSTab = isCloud;
4646
47+
let proxyRule = $derived(data.proxyRule);
4748
let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>(getDefaultTab());
48-
4949
const routeBase = `${base}/project-${page.params.region}-${page.params.project}/settings/domains`;
5050
let verified: boolean | undefined = $state(undefined);
5151
const isSubmitting = writable(false);
@@ -56,7 +56,7 @@
5656
5757
async function verify() {
5858
try {
59-
const apexDomain = getApexDomain(data.proxyRule.domain);
59+
const apexDomain = getApexDomain(proxyRule.domain);
6060
const domain = data.domainsList.domains.find((d) => d.domain === apexDomain);
6161
if (isCloud && domain) {
6262
await sdk.forConsole.domains.updateNameservers({
@@ -68,7 +68,7 @@
6868
}
6969
7070
try {
71-
await sdk
71+
proxyRule = await sdk
7272
.forProject(page.params.region, page.params.project)
7373
.proxy.updateRuleVerification({ ruleId });
7474
@@ -96,7 +96,7 @@
9696
.forProject(page.params.region, page.params.project)
9797
.proxy.deleteRule({ ruleId });
9898
}
99-
await goto(`${routeBase}/add-domain?domain=${data.proxyRule.domain}`);
99+
await goto(`${routeBase}/add-domain?domain=${proxyRule.domain}`);
100100
}
101101
</script>
102102

@@ -113,7 +113,7 @@
113113
<Icon icon={IconGlobeAlt} color="--fgcolor-neutral-primary" />
114114

115115
<Typography.Text variation="m-500" color="--fgcolor-neutral-primary">
116-
{data.proxyRule.domain}
116+
{proxyRule.domain}
117117
</Typography.Text>
118118
</Layout.Stack>
119119
<Button secondary on:click={back}>Change</Button>
@@ -160,14 +160,14 @@
160160
<Divider />
161161
</div>
162162
{#if selectedTab === 'nameserver'}
163-
<NameserverTable domain={data.proxyRule.domain} {verified} />
163+
<NameserverTable domain={proxyRule.domain} {verified} />
164164
{:else}
165165
<RecordTable
166166
{verified}
167167
service="general"
168168
variant={selectedTab}
169-
domain={data.proxyRule.domain}
170-
ruleStatus={data.proxyRule.status}
169+
domain={proxyRule.domain}
170+
ruleStatus={proxyRule.status}
171171
onNavigateToNameservers={() => (selectedTab = 'nameserver')}
172172
onNavigateToA={() => (selectedTab = 'a')}
173173
onNavigateToAAAA={() => (selectedTab = 'aaaa')} />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
6767
try {
68-
await sdk
68+
selectedProxyRule = await sdk
6969
.forProject(page.params.region, page.params.project)
7070
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
7171

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
);
4545
const showNSTab = isCloud;
4646
47+
let proxyRule = $derived(data.proxyRule);
4748
let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>(getDefaultTab());
4849
let routeBase = `${base}/project-${page.params.region}-${page.params.project}/sites/site-${page.params.site}/domains`;
4950
let verified: boolean | undefined = $state(undefined);
@@ -55,7 +56,7 @@
5556
5657
async function verify() {
5758
try {
58-
const apexDomain = getApexDomain(data.proxyRule.domain);
59+
const apexDomain = getApexDomain(proxyRule.domain);
5960
const domain = data.domainsList.domains.find((d) => d.domain === apexDomain);
6061
if (isCloud && domain) {
6162
await sdk.forConsole.domains.updateNameservers({
@@ -67,7 +68,7 @@
6768
}
6869
6970
try {
70-
await sdk
71+
proxyRule = await sdk
7172
.forProject(page.params.region, page.params.project)
7273
.proxy.updateRuleVerification({ ruleId });
7374
@@ -96,7 +97,7 @@
9697
.forProject(page.params.region, page.params.project)
9798
.proxy.deleteRule({ ruleId });
9899
}
99-
await goto(`${routeBase}/add-domain?domain=${data.proxyRule.domain}`);
100+
await goto(`${routeBase}/add-domain?domain=${proxyRule.domain}`);
100101
}
101102
</script>
102103

@@ -113,7 +114,7 @@
113114
<Icon icon={IconGlobeAlt} color="--fgcolor-neutral-primary" />
114115

115116
<Typography.Text variation="m-500" color="--fgcolor-neutral-primary">
116-
{data.proxyRule.domain}
117+
{proxyRule.domain}
117118
</Typography.Text>
118119
</Layout.Stack>
119120
<Button secondary on:click={back}>Change</Button>
@@ -162,15 +163,15 @@
162163
{#if selectedTab === 'nameserver'}
163164
<NameserverTable
164165
{verified}
165-
domain={data.proxyRule.domain}
166-
ruleStatus={data.proxyRule.status} />
166+
domain={proxyRule.domain}
167+
ruleStatus={proxyRule.status} />
167168
{:else}
168169
<RecordTable
169170
{verified}
170171
service="sites"
171172
variant={selectedTab}
172-
domain={data.proxyRule.domain}
173-
ruleStatus={data.proxyRule.status}
173+
domain={proxyRule.domain}
174+
ruleStatus={proxyRule.status}
174175
onNavigateToNameservers={() => (selectedTab = 'nameserver')}
175176
onNavigateToA={() => (selectedTab = 'a')}
176177
onNavigateToAAAA={() => (selectedTab = 'aaaa')} />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
6767
try {
68-
await sdk
68+
selectedProxyRule = await sdk
6969
.forProject(page.params.region, page.params.project)
7070
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
7171

0 commit comments

Comments
 (0)