Skip to content

Commit

Permalink
fix: remaining conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Jan 21, 2025
1 parent 3803c51 commit 12ddc5b
Show file tree
Hide file tree
Showing 22 changed files with 683 additions and 836 deletions.
3 changes: 1 addition & 2 deletions src/lib/components/searchQuery.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
export let required = false;
export let disabled = false;
export let autofocus = false;
export let fullWidth = false;
let element: HTMLInputElement;
let timer: ReturnType<typeof setTimeout>;
Expand Down Expand Up @@ -59,7 +58,7 @@
}
</script>

<div class={fullWidth ? 'u-width-full-line' : 'u-flex-basis-50-percent'}>
<div style:max-width="260px" style:width="100%">
<Input.Text {placeholder} {disabled} {required} type="search" bind:value={search}>
<svelte:fragment slot="end">
{#if search}
Expand Down
8 changes: 2 additions & 6 deletions src/lib/layout/activity.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
Trim
} from '$lib/components';
import { Container, ContainerHeader } from '$lib/layout';
import { hoursToDays, toLocaleDateTime } from '$lib/helpers/date';
import { toLocaleDateTime } from '$lib/helpers/date';
import type { Models } from '@appwrite.io/console';
import { tierToPlan, type PlanServices } from '$lib/stores/billing';
import { isCloud } from '$lib/system';
import { organization } from '$lib/stores/organization';
import { Button } from '$lib/elements/forms';
import { BillingPlan } from '$lib/constants';
import { type PlanServices } from '$lib/stores/billing';
import { Layout, Table } from '@appwrite.io/pink-svelte';
export let logs: Models.LogList;
Expand Down
218 changes: 106 additions & 112 deletions src/lib/pages/domains/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import Retry from './wizard/retry.svelte';
import { Pill } from '$lib/elements';
import { canWriteRules } from '$lib/stores/roles';
import { Layout, Table, Link } from '@appwrite.io/pink-svelte';
export let rules: Models.ProxyRuleList;
export let type: ResourceType;
Expand Down Expand Up @@ -63,127 +64,120 @@
{/if}
</div>
{#if rules.total}
<TableScroll>
<TableHeader>
<TableCellHead width={150}>Name</TableCellHead>
<TableCellHead width={120}>Verification Status</TableCellHead>
<TableCellHead width={180}>Certificate Status</TableCellHead>
<Table.Root>
<svelte:fragment slot="header">
<Table.Header.Cell>Name</Table.Header.Cell>
<Table.Header.Cell>Verification Status</Table.Header.Cell>
<Table.Header.Cell>Certificate Status</Table.Header.Cell>
{#if $canWriteRules}
<TableCellHead width={40} />
<Table.Header.Cell width="40" />
{/if}
</TableHeader>
<TableBody>
{#each rules.rules as domain, i}
<TableRow>
<TableCellLink
title="Domain"
href={`https://${domain.domain}`}
external
noStyle>
<span class="u-flex u-gap-4 u-cross-center">
<Trim>
<span class="link">{domain.domain}</span>
</Trim>
<span class="icon-external-link" aria-hidden="true" />
</span>
</TableCellLink>
<TableCell title="Verification">
{#if domain.status === 'created'}
<div class="u-flex u-gap-16 u-cross-center">
<Pill danger>
<span
class="icon-exclamation-circle u-color-text-danger"
aria-hidden="true" />
<span class="u-text">failed</span>
</Pill>
<button type="button" on:click={() => openRetry(domain)}>
<span class="link">Retry</span>
</button>
</div>
{:else}
</svelte:fragment>
{#each rules.rules as domain, index}
<Table.Row>
<Table.Cell>
<Layout.Stack direction="row" alignItems="center">
<Link.Anchor href={`https://${domain.domain}`} target="_blank">
{domain.domain}
</Link.Anchor>
</Layout.Stack>
</Table.Cell>
<Table.Cell>
{#if domain.status === 'created'}
<Layout.Stack direction="row" alignItems="center">
<Pill danger>
<span
class="icon-exclamation-circle u-color-text-danger"
aria-hidden="true" />
<span class="u-text">failed</span>
</Pill>
<button type="button" on:click={() => openRetry(domain)}>
<span class="link">Retry</span>
</button>
</Layout.Stack>
{:else}
<Pill success>
<span
class="icon-check-circle u-color-text-success"
aria-hidden="true" />
<p class="text">verified</p>
</Pill>
{/if}
</Table.Cell>
<Table.Cell>
{#if domain.status === 'unverified'}
<Layout.Stack direction="row" alignItems="center">
<Pill danger>
<span
class="icon-exclamation-circle u-color-text-danger"
aria-hidden="true" />
<span class="u-text">failed</span>
</Pill>
<button type="button" on:click={() => openRetry(domain)}>
<span class="link">Retry</span>
</button>
</Layout.Stack>
{:else if domain.status === 'verified'}
<Layout.Stack direction="row" alignItems="center">
<Pill success>
<span
class="icon-check-circle u-color-text-success"
aria-hidden="true" />
<p class="text">verified</p>
</Pill>
{/if}
</TableCell>
<TableCell title="Certificate">
{#if domain.status === 'unverified'}
<div class="u-flex u-gap-16 u-cross-center">
<Pill danger>
<span
class="icon-exclamation-circle u-color-text-danger"
aria-hidden="true" />
<span class="u-text">failed</span>
</Pill>
<button type="button" on:click={() => openRetry(domain)}>
<span class="link">Retry</span>
</button>
</div>
{:else if domain.status === 'verified'}
<div class="u-flex u-gap-16 u-cross-center">
<Pill success>
<span
class="icon-check-circle u-color-text-success"
aria-hidden="true" />
<span>generated</span>
</Pill>
{#if domain.renewAt}
<span class="u-text-color-gray">
Auto-renewal: {toLocaleDate(domain.renewAt)}
</span>
{/if}
</div>
{:else}
<Pill warning>
<span class="icon-clock u-text-color-gray" aria-hidden="true" />
<p class="text">blocked by verification</p>
<span>generated</span>
</Pill>
{/if}
</TableCell>
{#if $canWriteRules}
<TableCell right>
<DropList
bind:show={showDomainsDropdown[i]}
placement="bottom-start"
noArrow>
<Button
text
icon
ariaLabel="more options"
on:click={() =>
(showDomainsDropdown[i] = !showDomainsDropdown[i])}>
<span class="icon-dots-horizontal" aria-hidden="true" />
</Button>
<svelte:fragment slot="list">
{#if domain.status !== 'verified'}
<DropListItem
icon="refresh"
on:click={() => openRetry(domain, i)}>
{domain.status === 'unverified'
? 'Retry generation'
: 'Retry verification'}
</DropListItem>
{/if}
{#if domain.renewAt}
<span class="u-text-color-gray">
Auto-renewal: {toLocaleDate(domain.renewAt)}
</span>
{/if}
</Layout.Stack>
{:else}
<Pill warning>
<span class="icon-clock u-text-color-gray" aria-hidden="true" />
<p class="text">blocked by verification</p>
</Pill>
{/if}
</Table.Cell>
{#if $canWriteRules}
<Table.Cell>
<DropList
bind:show={showDomainsDropdown[index]}
placement="bottom-start"
noArrow>
<Button
text
icon
ariaLabel="more options"
on:click={() =>
(showDomainsDropdown[index] = !showDomainsDropdown[index])}>
<span class="icon-dots-horizontal" aria-hidden="true" />
</Button>
<svelte:fragment slot="list">
{#if domain.status !== 'verified'}
<DropListItem
icon="trash"
on:click={() => {
selectedDomain = domain;
showDelete = true;
showDomainsDropdown[i] = false;
}}>
Delete
icon="refresh"
on:click={() => openRetry(domain, index)}>
{domain.status === 'unverified'
? 'Retry generation'
: 'Retry verification'}
</DropListItem>
</svelte:fragment>
</DropList>
</TableCell>
{/if}
</TableRow>
{/each}
</TableBody>
</TableScroll>
{/if}
<DropListItem
icon="trash"
on:click={() => {
selectedDomain = domain;
showDelete = true;
showDomainsDropdown[index] = false;
}}>
Delete
</DropListItem>
</svelte:fragment>
</DropList>
</Table.Cell>
{/if}
</Table.Row>
{/each}
</Table.Root>
{:else}
<Empty
single
Expand Down
Loading

0 comments on commit 12ddc5b

Please sign in to comment.