chore: fix check errors

This commit is contained in:
Arman committed 2025-04-14 16:07:43 +02:00
1 parent d6767ac110
commit f2e93e8c72
23 files changed
+58 -48

No files matched your search

+11 -8
View File
@@ -3,6 +3,7 @@
import { formatCurrency } from '$lib/helpers/numbers';
import type { Coupon } from '$lib/sdk/billing';
import { sdk } from '$lib/stores/sdk';
import { Layout } from '@appwrite.io/pink-svelte';
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
@@ -36,17 +37,19 @@
}
</script>
<InputText
placeholder="Coupon code"
id="code"
label="Add credits"
{required}
disabled={couponData?.status === 'active'}
bind:value={coupon}>
<Layout.Stack direction="row" gap="s" wrap="wrap" alignItems="center">
<InputText
placeholder="Coupon code"
id="code"
label="Add credits"
{required}
disabled={couponData?.status === 'active'}
bind:value={coupon}>
</InputText>
<Button secondary disabled={couponData?.status === 'active' || !coupon} on:click={addCoupon}>
Apply
</Button>
</InputText>
</Layout.Stack>
{#if couponData?.status === 'error'}
<div>
<span class="icon-exclamation-circle u-color-text-danger"></span>
+1 -2
View File
@@ -54,8 +54,7 @@
<InteractiveText
variant="copy"
isVisible
text={$consoleVariables._APP_DOMAIN_TARGET_CNAME}>
{$consoleVariables._APP_DOMAIN_TARGET_CNAME}</InteractiveText>
text={$consoleVariables._APP_DOMAIN_TARGET_CNAME} />
</Table.Cell>
</Table.Row.Base>
</Table.Root>
@@ -37,8 +37,7 @@
<Table.Row.Base {root}>
<Table.Cell {root}>NS</Table.Cell>
<Table.Cell {root}>
<InteractiveText variant="copy" isVisible text={nameserver}>
{nameserver}</InteractiveText>
<InteractiveText variant="copy" isVisible text={nameserver} />
</Table.Cell>
</Table.Row.Base>
{/each}
@@ -63,8 +63,7 @@
<Table.Cell {root}>{variant.toUpperCase()}</Table.Cell>
<Table.Cell {root}>{subdomain || '@'}</Table.Cell>
<Table.Cell {root}>
<InteractiveText variant="copy" isVisible text={setTarget()}>
{setTarget()}</InteractiveText>
<InteractiveText variant="copy" isVisible text={setTarget()} />
</Table.Cell>
</Table.Row.Base>
</Table.Root>
+1 -1
View File
@@ -26,7 +26,7 @@
alignItems="center"
wrap="wrap">
<p class="text">Total results: 0</p>
<PaginationInline limit={1} offset={0} sum={0} {hidePages} />
<PaginationInline limit={1} offset={0} total={0} {hidePages} />
</Layout.Stack>
{/if}
</Layout.Stack>
@@ -18,7 +18,7 @@
import Row from './row.svelte';
import { Icon, Selector, Table } from '@appwrite.io/pink-svelte';
import { IconPlus, IconX } from '@appwrite.io/pink-icons-svelte';
import type { Column } from '@appwrite.io/pink-svelte/dist/table';
import type { Column } from '$lib/helpers/types';
export let withCreate = false;
export let permissions: string[] = [];
+1 -1
View File
@@ -107,7 +107,7 @@
</Table.Root>
<div class="u-flex u-margin-block-start-32 u-main-space-between">
<p class="text">Total results: {results?.total}</p>
<PaginationInline limit={5} bind:offset sum={results?.total} hidePages />
<PaginationInline limit={5} bind:offset total={results?.total} hidePages />
</div>
{:else if search}
<EmptySearch bind:search target="teams" hidePages>
+1 -1
View File
@@ -141,7 +141,7 @@
<Layout.Stack direction="row" justifyContent="space-between" alignItems="center">
<p class="text">Total results: {results?.total}</p>
<PaginationInline limit={5} bind:offset sum={results?.total} hidePages />
<PaginationInline limit={5} bind:offset total={results?.total} hidePages />
</Layout.Stack>
{:else if search}
<EmptySearch bind:search target="users" hidePages>
+1 -6
View File
@@ -1,10 +1,5 @@
<script lang="ts">
import { Selector } from '@appwrite.io/pink-svelte';
import type Radio from '@appwrite.io/pink-svelte/dist/selector/Radio.svelte';
import type { ComponentProps } from 'svelte';
type Props = ComponentProps<Radio>;
export let label: string = null;
export let id: string;
@@ -13,7 +8,7 @@
export let name: string;
export let required = false;
export let disabled = false;
export let size: Props['size'] = 'm';
export let size: 's' | 'm' = 'm';
</script>
<Selector.Radio
+14 -1
View File
@@ -1,6 +1,19 @@
import type { Column as PinkColumn } from '@appwrite.io/pink-svelte/dist/table';
import type { Writable } from 'svelte/store';
export type PinkColumn = {
id: string;
width?:
| {
min: number;
max: number;
}
| {
min: number;
}
| number;
hide?: boolean;
};
export type WritableValue<T> = T extends Writable<infer U> ? U : never;
export function isHTMLElement(el: unknown): el is HTMLElement {
+1 -2
View File
@@ -31,7 +31,6 @@
import { page } from '$app/state';
import { base } from '$app/paths';
export let search: string = null;
export let rules: Models.ProxyRuleList;
export let dependency: Dependencies;
@@ -58,7 +57,7 @@
{#if $canWriteRules}
<Layout.Stack direction="row" justifyContent="space-between">
<Layout.Stack direction="row" alignItems="center">
<SearchQuery {search} placeholder="Search by name" />
<SearchQuery placeholder="Search by name" />
</Layout.Stack>
<Layout.Stack direction="row" alignItems="center" justifyContent="flex-end">
<Button
+4 -1
View File
@@ -8,7 +8,10 @@
<Container>
<div>
<Typography.Title size="xl">{page.error.status || 'Invalid Argument'}</Typography.Title>
<Typography.Title size="xl"
>{'status' in page.error
? page.error.status || 'Invalid Argument'
: 'Invalid Argument'}</Typography.Title>
<Typography.Title>{page.error.message}</Typography.Title>
</div>
<div>
@@ -143,7 +143,7 @@
}
});
function findRegion(project: Models.Project) {
function findRegion(project: Models.Project & { region: string }) {
return regions.regions.find((region) => region.$id === project.region);
}
</script>
@@ -158,7 +158,7 @@
{#if creditList?.total > limit}
<div class="u-flex u-main-space-between">
<p class="text">Total credits: {creditList?.total}</p>
<PaginationInline {limit} bind:offset sum={creditList?.total} hidePages />
<PaginationInline {limit} bind:offset total={creditList?.total} hidePages />
</div>
{/if}
{:else}
@@ -165,7 +165,7 @@
{#if invoiceList.total > limit}
<div class="u-flex u-main-space-between">
<p class="text">Total results: {invoiceList.total}</p>
<PaginationInline {limit} bind:offset sum={invoiceList.total} hidePages />
<PaginationInline {limit} bind:offset total={invoiceList.total} hidePages />
</div>
{/if}
{:else}
@@ -85,8 +85,7 @@
<Table.Row.Base {root}>
<Table.Cell column="type" {root}>NS</Table.Cell>
<Table.Cell column="value" {root}>
<InteractiveText variant="copy-code" isVisible text={nameserver}>
{nameserver}</InteractiveText>
<InteractiveText variant="copy-code" isVisible text={nameserver} />
</Table.Cell>
</Table.Row.Base>
{/each}
@@ -68,8 +68,7 @@
<Table.Row.Base {root}>
<Table.Cell {root} column="ns">NS</Table.Cell>
<Table.Cell {root} column="action">
<InteractiveText variant="copy" isVisible text={nameserver}>
{nameserver}</InteractiveText>
<InteractiveText variant="copy" isVisible text={nameserver} />
</Table.Cell>
</Table.Row.Base>
{/each}
@@ -5,6 +5,9 @@
</script>
<Container>
<Typography.Title size="xl">{page.error.status || 'Invalid Argument'}</Typography.Title>
<Typography.Title size="xl"
>{'status' in page.error
? page.error.status || 'Invalid Argument'
: 'Invalid Argument'}</Typography.Title>
<p class="body-text-2 u-bold u-margin-block-start-4">{page.error.message}</p>
</Container>
@@ -27,7 +27,7 @@
sortedCollections()?.find((collection) => collection.$id === collectionId)
);
let openBottomSheet = false;
let openBottomSheet = $state(false);
function onResize() {
if (openBottomSheet && !$isTabletViewport) {
@@ -95,7 +95,7 @@
type="button"
class="trigger"
aria-label="Open collections"
on:click={() => {
onclick={() => {
openBottomSheet = !openBottomSheet;
}}>
<span class="orgName">{selectedCollection.name}</span>
@@ -138,7 +138,7 @@
</Table.Root>
<div class="u-flex u-main-space-between u-cross-center">
<p class="text">Total results: {totalResults}</p>
<PaginationInline limit={5} bind:offset sum={totalResults} hidePages />
<PaginationInline limit={5} bind:offset total={totalResults} hidePages />
</div>
{:else if search}
<EmptySearch hidePagination {search}>
@@ -174,7 +174,7 @@
{/each}
<div class="u-flex u-main-space-between u-cross-center">
<p class="text">Total results: {totalResults}</p>
<PaginationInline limit={5} bind:offset sum={totalResults} hidePages />
<PaginationInline limit={5} bind:offset total={totalResults} hidePages />
</div>
{:else if search}
<EmptySearch hidePagination {search}>
@@ -22,16 +22,12 @@
{#if isConflicting}
<p data-private>
Promoting this variable will overwrite your global variable with the same name. Are you
sure you want to promote <InlineCode code={selectedVar.key}
>{selectedVar.key}</InlineCode
>?
sure you want to promote <InlineCode code={selectedVar.key} />?
</p>
{:else}
<p data-private>
Are you sure you want to promote <InlineCode code={selectedVar.key}
>{selectedVar.key}</InlineCode
>? This will convert it to a global variable that can be accessed by other resources in
your project.
Are you sure you want to promote <InlineCode code={selectedVar.key} />? This will
convert it to a global variable that can be accessed by other resources in your project.
</p>
{/if}
<svelte:fragment slot="footer">
+4 -1
View File
@@ -7,7 +7,10 @@
</script>
<Unauthenticated>
<Typography.Title size="xl">{page.error.status || 'Invalid Argument'}</Typography.Title>
<Typography.Title size="xl"
>{'status' in page.error
? page.error.status || 'Invalid Argument'
: 'Invalid Argument'}</Typography.Title>
<Typography.Title>{page.error.message}</Typography.Title>
<Button href={base}>Back to the console</Button>
</Unauthenticated>