more cleanup.

This commit is contained in:
Darshan
2025-03-19 15:30:22 +05:30
parent 3effd7be3e
commit 5af347f684
31 changed files with 38 additions and 42 deletions
-1
View File
@@ -9,7 +9,6 @@
export let name: string;
export let id: string;
export let autofocus = true;
export let fullWidth = false;
export let isProject = false;
$: if (!show) {
id = null;
+1 -2
View File
@@ -15,7 +15,6 @@
export let hideFooter = false;
let alert: HTMLElement;
let formComponent: Form;
beforeNavigate(() => {
show = false;
@@ -28,7 +27,7 @@
}
</script>
<Form isModal {onSubmit} bind:this={formComponent}>
<Form isModal {onSubmit}>
<Modal {size} {title} bind:open={show} {hideFooter} {dismissible}>
<slot slot="description" name="description" />
{#if error}
+1 -1
View File
@@ -6,7 +6,7 @@
export let selected: string[] = [];
export let pageItemsIds: string[] = [];
function handleClick(e: CustomEvent) {
function handleClick(e: MouseEvent) {
if (!isHTMLInputElement(e.target)) return;
if (e.target.checked) {
const set = new Set(selected);
+1
View File
@@ -30,6 +30,7 @@ export type Column = PinkColumn & {
filter?: boolean;
array?: boolean;
format?: string;
show?: boolean;
elements?: string[] | { value: string | number; label: string }[];
};
+1 -1
View File
@@ -27,7 +27,7 @@ export type Domain = {
/**
* Nameservers setting. &quot;Appwrite&quot; or empty string.
*/
nameservers: string[];
nameservers: string;
/**
* Domain expiry date in ISO 8601 format.
*/
@@ -7,7 +7,12 @@
import { toLocaleDateTime } from '$lib/helpers/date';
import Container from '$lib/layout/container.svelte';
import { protocol } from '$routes/(console)/store.js';
import { IconDotsHorizontal, IconPlus, IconTrash } from '@appwrite.io/pink-icons-svelte';
import {
IconDotsHorizontal,
IconPlus,
IconRefresh,
IconTrash
} from '@appwrite.io/pink-icons-svelte';
import {
ActionMenu,
Card,
@@ -18,6 +23,7 @@
Table
} from '@appwrite.io/pink-svelte';
import DeleteDomainModal from './deleteDomainModal.svelte';
import RetryDomainModal from './retryDomainModal.svelte';
import { queries } from '$lib/components/filters';
import SearchQuery from '$lib/components/searchQuery.svelte';
import { app } from '$lib/stores/app';
@@ -27,6 +33,7 @@
export let data;
let showDelete = false;
let showRetry = false;
let selectedDomain: Domain = null;
</script>
@@ -77,7 +84,7 @@
</Table.Cell>
<Table.Cell column="registrar" {root}>{domain?.registrar || '-'}</Table.Cell>
<Table.Cell column="nameservers" {root}
>{domain?.nameservers || '-'}</Table.Cell>
>{domain?.nameservers || '-'}</Table.Cell>
<Table.Cell column="expiry_date" {root}>
{domain?.expiry ? toLocaleDateTime(domain.expiry) : '-'}
</Table.Cell>
@@ -85,7 +92,7 @@
{domain.renewal ? toLocaleDateTime(domain.renewal) : '-'}
</Table.Cell>
<Table.Cell column="auto_renewal" {root}
>{domain.autoRenewal ? 'On' : 'Off'}</Table.Cell>
>{domain.autoRenewal ? 'On' : 'Off'}</Table.Cell>
<Table.Cell column="actions" {root}>
<Layout.Stack direction="row" justifyContent="flex-end">
<Popover let:toggle placement="bottom-end" padding="none">
@@ -198,4 +205,4 @@
{#if showRetry}
<RetryDomainModal show={showRetry} {selectedDomain} />
{/if}
{/if}
@@ -17,7 +17,7 @@
description: 'Registrar'
},
{
value: domain?.nameservers ? domain?.nameservers.join(', ') : '-',
value: domain?.nameservers ? domain?.nameservers : '-',
description: 'Nameservers'
},
{
@@ -1,5 +1,5 @@
<script lang="ts">
import { Modal, SecondaryTabs, SecondaryTabsItem } from '$lib/components';
import { Modal } from '$lib/components';
import { Button, InputText } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
@@ -156,11 +156,6 @@
</Modal>
<style>
.box {
padding: unset;
border-radius: var(--border-radius-medium, 8px);
}
:global(.max-height-dialog dialog) {
max-height: 650px;
}
@@ -402,6 +402,9 @@
margin: auto;
}
/**
TODO: @itznotabug - see in backups pink2.
*/
.actions {
.indicator {
border-radius: 0.25rem;
@@ -6,7 +6,6 @@
export let label: string;
export let value: string;
export let attribute: Models.AttributeDatetime;
export let optionalText: string | undefined = undefined;
</script>
<InputDateTime
@@ -5,7 +5,6 @@
export let id: string;
export let label: string;
export let value: string | null;
export let optionalText: string | undefined = undefined;
export let attribute: Models.AttributeUrl;
</script>
@@ -6,7 +6,6 @@
export let label: string;
export let value: number;
export let attribute: Models.AttributeInteger;
export let optionalText: string | undefined = undefined;
</script>
<InputNumber
@@ -6,7 +6,6 @@
export let label: string;
export let value: string;
export let attribute: Models.AttributeString;
export let optionalText: string | undefined = undefined;
</script>
{#if attribute.size >= 50}
@@ -5,7 +5,6 @@
export let id: string;
export let label: string;
export let value: string | null;
export let optionalText: string | undefined = undefined;
export let attribute: Models.AttributeUrl;
</script>
@@ -1,7 +1,7 @@
<script lang="ts">
import { Empty } from '$lib/components';
import { Container } from '$lib/layout';
import { collection, indexes } from '../store';
import { collection } from '../store';
import Delete from './deleteIndex.svelte';
import Create from './createIndex.svelte';
import Overview from './overviewIndex.svelte';
@@ -3,7 +3,7 @@
import { base } from '$app/paths';
import { page } from '$app/stores';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { Id, Modal } from '$lib/components';
import { Id } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Button } from '$lib/elements/forms';
import { toLocaleDateTime } from '$lib/helpers/date';
@@ -4,8 +4,9 @@
import type { Domain } from '$lib/sdk/domains';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
import { Badge, Layout, Typography, Table, Fieldset, Icon } from '@appwrite.io/pink-svelte';
import type { Models } from '@appwrite.io/console';
export let domain: Domain;
export let domain: Domain | Models.ProxyRule;
</script>
<Fieldset legend="Verification">
@@ -8,9 +8,10 @@
import { Dependencies } from '$lib/constants';
import RecordsCard from './recordsCard.svelte';
import type { Domain } from '$lib/sdk/domains';
import type { Models } from '@appwrite.io/console';
export let show = false;
export let selectedDomain: Domain;
export let selectedDomain: Domain | Models.ProxyRule;
let error = null;
async function retryDomain() {
@@ -14,7 +14,7 @@
import { Dependencies } from '$lib/constants';
import Cancel from './(modals)/cancel.svelte';
import { base } from '$app/paths';
import { ActionMenu, Icon, Layout, Status, Table } from '@appwrite.io/pink-svelte';
import { ActionMenu, Icon, Status, Table } from '@appwrite.io/pink-svelte';
import { Click, trackEvent } from '$lib/actions/analytics';
import {
IconDotsHorizontal,
@@ -28,7 +28,6 @@
{#if mbSecondsCount}
<Usage
hidePeriodSelect
title="GB hours"
path={`${base}/project-${$page.params.project}/functions/function-${$page.params.function}/usage`}
countMetadata={{
legend: 'GB hours',
@@ -6,7 +6,6 @@
EmptyFilter,
EmptySearch,
Id,
Modal,
PaginationWithLimit,
SearchQuery,
ViewSelector
@@ -9,7 +9,6 @@
import { Dependencies } from '$lib/constants';
import { addNotification } from '$lib/stores/notifications';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { validateData } from '../wizard/pushFormList.svelte';
import { Icon, Layout, Typography } from '@appwrite.io/pink-svelte';
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
@@ -16,13 +16,11 @@
import Table from './table.svelte';
import { base } from '$app/paths';
import { canWriteProviders } from '$lib/stores/roles';
import { Card, Layout, Typography, Empty, Icon } from '@appwrite.io/pink-svelte';
import { Card, Layout, Empty, Icon } from '@appwrite.io/pink-svelte';
import { View } from '$lib/helpers/load';
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
export let data: PageData;
let showCreateDropdownEmpty = false;
</script>
<Container>
@@ -1,7 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { Id, Modal } from '$lib/components';
import { Id } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import type { PageData } from './$types';
@@ -1,7 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { Id, Modal } from '$lib/components';
import { Id } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import type { PageData } from './$types';
@@ -2,7 +2,7 @@
import { invalidate } from '$app/navigation';
import { base } from '$app/paths';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { Id, Modal } from '$lib/components';
import { Id } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Button } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
@@ -40,7 +40,7 @@
if (status === 'failed') {
return 'failed';
} else if (status === 'completed') {
return 'completed';
return 'complete';
} else if (status === 'processing') {
return 'processing';
}
@@ -29,13 +29,14 @@
import { app } from '$lib/stores/app';
import { Click, trackEvent } from '$lib/actions/analytics';
import CreatePreviewDomainModal from './createPreviewDomainModal.svelte';
import type { Domain } from '$lib/sdk/domains.js';
export let data;
let showDelete = false;
let showRetry = false;
let selectedDomain: Models.ProxyRule = null;
let showPreviewDomainModal = false;
let selectedDomain: Domain | Models.ProxyRule = null;
$: console.log(data.domains);
</script>
@@ -10,11 +10,9 @@
Layout,
Tooltip,
Icon,
Alert,
Input,
Divider,
Typography,
Badge,
Card
} from '@appwrite.io/pink-svelte';
import { goto, invalidate } from '$app/navigation';
@@ -4,8 +4,9 @@
import type { Domain } from '$lib/sdk/domains';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
import { Badge, Layout, Typography, Table, Fieldset, Icon } from '@appwrite.io/pink-svelte';
import type { Models } from '@appwrite.io/console';
export let domain: Domain;
export let domain: Domain | Models.ProxyRule;
</script>
<Fieldset legend="Verification">
@@ -4,14 +4,14 @@
import { sdk } from '$lib/stores/sdk';
import { addNotification } from '$lib/stores/notifications';
import { invalidate } from '$app/navigation';
import type { Models } from '@appwrite.io/console';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { Dependencies } from '$lib/constants';
import RecordsCard from './recordsCard.svelte';
import type { Domain } from '$lib/sdk/domains';
import type { Models } from '@appwrite.io/console';
export let show = false;
export let selectedDomain: Domain;
export let selectedDomain: Domain | Models.ProxyRule;
let error = null;
async function retryDomain() {