mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: edgecase
This commit is contained in:
1 parent
f222c5e2a6
commit
9ff3816730
3 files changed
+50
-43
No files matched your search
+38
-32
@@ -10,37 +10,43 @@
|
||||
</script>
|
||||
|
||||
<Layout.Stack gap="xxs" direction="row" alignItems="center">
|
||||
<Link external href={`${$protocol}${domains.rules[0].domain}`} variant="muted">
|
||||
<Layout.Stack gap="xxs" direction="row" alignItems="center">
|
||||
<Trim alternativeTrim>
|
||||
<Typography.Text variant="m-400" color="--color-fgcolor-neutral-primary">
|
||||
{domains.rules[0].domain}
|
||||
</Typography.Text>
|
||||
</Trim>
|
||||
<Icon icon={IconExternalLink} size="s" />
|
||||
</Layout.Stack>
|
||||
</Link>
|
||||
{#if domains.rules.length > 1}
|
||||
<Popover padding="none" let:toggle>
|
||||
<Tag size="s" on:click={toggle}>
|
||||
+{domains.rules.length - 1}
|
||||
</Tag>
|
||||
<svelte:fragment slot="tooltip">
|
||||
<ActionMenu.Root>
|
||||
{#each domains.rules as rule, i}
|
||||
{#if i !== 0}
|
||||
<ActionMenu.Item.Anchor
|
||||
href={`${$protocol}${rule.domain}`}
|
||||
external
|
||||
leadingIcon={IconExternalLink}>
|
||||
<Trim alternativeTrim>
|
||||
{rule.domain}
|
||||
</Trim>
|
||||
</ActionMenu.Item.Anchor>
|
||||
{/if}
|
||||
{/each}
|
||||
</ActionMenu.Root>
|
||||
</svelte:fragment>
|
||||
</Popover>
|
||||
{#if domains.total}
|
||||
<Link external href={`${$protocol}${domains.rules[0]?.domain}`} variant="muted">
|
||||
<Layout.Stack gap="xxs" direction="row" alignItems="center">
|
||||
<Trim alternativeTrim>
|
||||
<Typography.Text variant="m-400" color="--color-fgcolor-neutral-primary">
|
||||
{domains.rules[0]?.domain}
|
||||
</Typography.Text>
|
||||
</Trim>
|
||||
<Icon icon={IconExternalLink} size="s" />
|
||||
</Layout.Stack>
|
||||
</Link>
|
||||
{#if domains.rules.length > 1}
|
||||
<Popover padding="none" let:toggle>
|
||||
<Tag size="s" on:click={toggle}>
|
||||
+{domains.rules.length - 1}
|
||||
</Tag>
|
||||
<svelte:fragment slot="tooltip">
|
||||
<ActionMenu.Root>
|
||||
{#each domains.rules as rule, i}
|
||||
{#if i !== 0}
|
||||
<ActionMenu.Item.Anchor
|
||||
href={`${$protocol}${rule.domain}`}
|
||||
external
|
||||
leadingIcon={IconExternalLink}>
|
||||
<Trim alternativeTrim>
|
||||
{rule.domain}
|
||||
</Trim>
|
||||
</ActionMenu.Item.Anchor>
|
||||
{/if}
|
||||
{/each}
|
||||
</ActionMenu.Root>
|
||||
</svelte:fragment>
|
||||
</Popover>
|
||||
{/if}
|
||||
{:else}
|
||||
<Typography.Text variant="m-400" color="--color-fgcolor-neutral-primary">
|
||||
No domains available
|
||||
</Typography.Text>
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
+4
-3
@@ -61,7 +61,7 @@
|
||||
Drag and drop files here or click to upload
|
||||
</Typography.Text>
|
||||
<Tooltip>
|
||||
<Layout.Stack alignItems="center" justifyContent="center">
|
||||
<Layout.Stack alignItems="center" justifyContent="center" inline>
|
||||
<Icon icon={IconInfo} size="s" />
|
||||
</Layout.Stack>
|
||||
<svelte:fragment slot="tooltip">
|
||||
@@ -69,8 +69,9 @@
|
||||
</svelte:fragment>
|
||||
</Tooltip>
|
||||
</Layout.Stack>
|
||||
<Typography.Caption variant="400"
|
||||
>Up to 100 variables allowed</Typography.Caption>
|
||||
<Typography.Caption variant="400">
|
||||
Up to 100 variables allowed
|
||||
</Typography.Caption>
|
||||
</Layout.Stack>
|
||||
</Upload.Dropzone>
|
||||
{#if variables?.length > 0}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import OpenOnMobileModal from '../(components)/openOnMobileModal.svelte';
|
||||
import { timeFromNow } from '$lib/helpers/date';
|
||||
import { IconExternalLink, IconQrcode } from '@appwrite.io/pink-icons-svelte';
|
||||
import { consoleVariables, protocol } from '$routes/(console)/store';
|
||||
import { protocol } from '$routes/(console)/store';
|
||||
import { type Models } from '@appwrite.io/console';
|
||||
import { Link } from '$lib/elements';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
@@ -16,11 +16,11 @@
|
||||
let showDomainQR = false;
|
||||
let selectedDomainURL: string;
|
||||
|
||||
$: hasCustomDomain = proxyRuleList?.total
|
||||
? proxyRuleList.rules.some((rule) =>
|
||||
rule.domain.includes($consoleVariables._APP_DOMAIN_TARGET)
|
||||
)
|
||||
: false;
|
||||
// $: hasCustomDomain = proxyRuleList?.total
|
||||
// ? proxyRuleList.rules.some((rule) =>
|
||||
// rule.domain.includes($consoleVariables._APP_DOMAIN_TARGET)
|
||||
// )
|
||||
// : false;
|
||||
</script>
|
||||
|
||||
<Layout.Stack>
|
||||
@@ -42,7 +42,7 @@
|
||||
{#if proxyRuleList?.rules?.length <= 1}
|
||||
<Layout.Stack gap="l">
|
||||
<Layout.Stack gap="xxs">
|
||||
<Typography.Text variant="l-500">
|
||||
<Typography.Text variant="m-500">
|
||||
Add your first custom domain
|
||||
</Typography.Text>
|
||||
<Typography.Caption variant="500" color="--color-fgcolor-neutral-tertiary">
|
||||
@@ -53,7 +53,7 @@
|
||||
<div>
|
||||
<Button
|
||||
secondary
|
||||
size="xs"
|
||||
size="s"
|
||||
href={`${base}/project-${$page.params.project}/sites/site-${$page.params.site}/domains/add-domain`}>
|
||||
Add domain
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user