fix: domains

This commit is contained in:
Torsten Dittmann committed 2022-11-11 12:08:26 +01:00
1 parent 8d7ec43788
commit ec370a8950
2 files changed
+29 -19

No files matched your search

@@ -1,5 +1,6 @@
<script lang="ts">
import { Copy } from '$lib/components';
import { Button } from '$lib/elements/forms';
import {
Table,
TableBody,
@@ -21,18 +22,21 @@
<TableCellHead>Type</TableCellHead>
<TableCellHead>Name</TableCellHead>
<TableCellHead>Value</TableCellHead>
<TableCellHead width={50} />
</TableHeader>
<TableBody>
<TableRow>
<TableCellText title="Type">CNAME</TableCellText>
<TableCellText title="Name">{cnameValue}</TableCellText>
<TableCell title="Value">
<div class="u-flex u-main-space-between u-cross-center">
<span class="text">{$domain.domain}</span>
<TableCellText title="Value">
{$domain.domain}
</TableCellText>
<TableCell>
<Button text>
<Copy value={$domain.domain}>
<span class="icon-duplicate" aria-hidden="true" />
</Copy>
</div>
</Button>
</TableCell>
</TableRow>
</TableBody>
@@ -4,6 +4,7 @@
import { domain } from './store';
import { project } from '../../../store';
import { addNotification } from '$lib/stores/notifications';
import { Pill } from '$lib/elements';
const projectId = $project.$id;
@@ -30,22 +31,27 @@
</script>
<div class="box u-flex u-gap-16 u-cross-center">
{#if isVerifying}
<div
class="loader"
style="color: hsl(var(--color-neutral-50)); inline-size: 1.25rem; block-size: 1.25rem" />
{#if isVerified}
<Pill success>
<span class="icon-check-circle" style="font-size: var(--icon-size-small);" />verified
</Pill>
<p class="u-stretch">Domain has been verified</p>
{:else}
<span
class:u-hide={isVerifying}
class:icon-x={!isVerified}
class:icon-check={isVerified}
aria-hidden="true"
style="color: hsl(var(--color-neutral-50))" />
{#if isVerifying}
<div
class="loader"
style="color: hsl(var(--color-neutral-50)); inline-size: 1.5rem; block-size: 1.5rem" />
{:else}
<Pill danger>
<span
class="icon-exclamation-circle"
style="font-size: var(--icon-size-small);" />failed
</Pill>
{/if}
<p class="u-stretch">Domain is pending verification</p>
{/if}
<p class="u-stretch">
{!isVerified ? 'Domain is pending verification' : 'Verified domain'}
</p>
{#if !isVerifying && !isVerified}
<Button secondary on:click={verifyDomain}>Verify</Button>
{#if !isVerified}
<Button secondary disabled={isVerifying} on:click={verifyDomain}>Verify</Button>
{/if}
</div>