|
22 | 22 | Skeleton, |
23 | 23 | Divider |
24 | 24 | } from '@appwrite.io/pink-svelte'; |
25 | | - import { base, resolve } from '$app/paths'; |
26 | | - import { page } from '$app/state'; |
| 25 | + import { resolve } from '$app/paths'; |
27 | 26 | import { Click, trackEvent } from '$lib/actions/analytics'; |
28 | 27 | import { regionalProtocol } from '$routes/(console)/project-[region]-[project]/store'; |
29 | 28 | import { goto } from '$app/navigation'; |
|
83 | 82 | previousDeleteState = showDelete; |
84 | 83 | previousRetryState = showRetry; |
85 | 84 | }); |
| 85 | +
|
| 86 | + const addDomainUrl = $derived.by(() => { |
| 87 | + const baseUrl = resolve( |
| 88 | + '/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain', |
| 89 | + { |
| 90 | + region, |
| 91 | + project: projectId, |
| 92 | + site: siteId |
| 93 | + } |
| 94 | + ); |
| 95 | + return `${baseUrl}?types=false`; |
| 96 | + }); |
86 | 97 | </script> |
87 | 98 |
|
88 | 99 | <Table.Root columns={[{ id: 'domain' }, { id: 'actions', width: 40 }]} let:root> |
|
153 | 164 | </Table.Root> |
154 | 165 |
|
155 | 166 | <Layout.Stack style="width: min-content;"> |
156 | | - <Button |
157 | | - compact |
158 | | - on:onclick={async () => { |
159 | | - await goto( |
160 | | - resolve( |
161 | | - '/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain?types=false', |
162 | | - { |
163 | | - region, |
164 | | - project: projectId, |
165 | | - site: siteId |
166 | | - } |
167 | | - ) |
168 | | - ); |
169 | | - }}> |
| 167 | + <Button compact on:onclick={async () => await goto(addDomainUrl)}> |
170 | 168 | <Icon icon={IconPlus} size="s" /> |
171 | 169 | Add domain |
172 | 170 | </Button> |
|
180 | 178 | <RetryDomainModal bind:show={showRetry} {selectedProxyRule} /> |
181 | 179 | {/if} |
182 | 180 |
|
183 | | -{#snippet domainActions(rule: Models.ProxyRule, toggle: (e: Event) => void)} |
| 181 | +{#snippet domainActions(rule: Models.ProxyRule, toggle: () => void)} |
184 | 182 | <ActionMenu.Root> |
185 | | - <ActionMenu.Item.Link href={`${$regionalProtocol}${rule.domain}`} external> |
| 183 | + <ActionMenu.Item.Anchor href={`${$regionalProtocol}${rule.domain}`} external> |
186 | 184 | Open domain |
187 | | - </ActionMenu.Item.Link> |
| 185 | + </ActionMenu.Item.Anchor> |
188 | 186 | {#if rule.status !== 'verified' && rule.status !== 'verifying'} |
189 | 187 | <ActionMenu.Item.Button |
190 | 188 | leadingIcon={IconRefresh} |
|
0 commit comments