mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
add: domain status badge again.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
import {
|
||||
ActionMenu,
|
||||
Badge,
|
||||
Card,
|
||||
Empty,
|
||||
Icon,
|
||||
@@ -38,6 +39,10 @@
|
||||
let showDelete = false;
|
||||
let showRetry = false;
|
||||
let selectedDomain: Domain = null;
|
||||
|
||||
const isDomainVerified = (domain: Domain) => {
|
||||
return domain.nameservers.toLocaleLowerCase() === 'appwrite';
|
||||
};
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
@@ -76,16 +81,22 @@
|
||||
<Table.Cell column={column.id} {root}>
|
||||
<Typography.Text truncate>
|
||||
{#if column.id === 'domain'}
|
||||
<Layout.Stack direction="row" gap="none">
|
||||
<Layout.Stack direction="row" gap="xs">
|
||||
<Link
|
||||
external
|
||||
href={`${$protocol}${domain.domain}`}
|
||||
variant="quiet"
|
||||
icon>
|
||||
variant="quiet">
|
||||
<Typography.Text truncate>
|
||||
{domain.domain}
|
||||
</Typography.Text>
|
||||
</Link>
|
||||
{#if !isDomainVerified(domain)}
|
||||
<Badge
|
||||
variant="secondary"
|
||||
type="warning"
|
||||
content="Not verified"
|
||||
size="s" />
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
{:else if column.id === 'registrar'}
|
||||
{domain.registrar || '-'}
|
||||
@@ -117,7 +128,7 @@
|
||||
|
||||
<svelte:fragment slot="tooltip" let:toggle>
|
||||
<ActionMenu.Root>
|
||||
{#if domain.nameservers !== 'Appwrite'}
|
||||
{#if isDomainVerified(domain)}
|
||||
<ActionMenu.Item.Button
|
||||
leadingIcon={IconRefresh}
|
||||
on:click={(e) => {
|
||||
|
||||
@@ -6,8 +6,8 @@ import { derived, writable } from 'svelte/store';
|
||||
export const domain = derived(page, ($page) => $page.data.domain as Domain);
|
||||
export const columns = writable<Column[]>([
|
||||
{ id: 'name', title: 'Name', type: 'string' },
|
||||
{ id: 'type', title: 'Type', type: 'string' },
|
||||
{ id: 'value', title: 'Value', type: 'string' },
|
||||
{ id: 'type', title: 'Type', type: 'string', width: 125 },
|
||||
{ id: 'value', title: 'Value', type: 'string', width: 250 },
|
||||
{ id: 'ttl', title: 'TTL', type: 'integer' },
|
||||
{ id: 'priority', title: 'Priority', type: 'integer', hide: true },
|
||||
{ id: 'comment', title: 'Comment', type: 'string', hide: true },
|
||||
|
||||
+4
-1
@@ -57,7 +57,10 @@
|
||||
{:else if column.id === 'value'}
|
||||
{@const isARecord = record.value === 'a.a.a.a'}
|
||||
{#if isARecord}
|
||||
<Typography.Text>Served by Appwrite</Typography.Text>
|
||||
<!-- to align with InteractiveText -->
|
||||
<div style:padding-inline-start="4px">
|
||||
<Typography.Text>Served by Appwrite</Typography.Text>
|
||||
</div>
|
||||
{:else}
|
||||
<InteractiveText variant="copy" text={record.value} isVisible />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user