Skip to content

Commit fad656d

Browse files
committed
fix: tables
1 parent 70b73a5 commit fad656d

File tree

11 files changed

+20
-25
lines changed

11 files changed

+20
-25
lines changed

Diff for: src/lib/components/billing/usageRates.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
</Typography.Text>
6464
{/if}
6565
<Table.Root
66-
columns={[{ id: 'resource' }, { id: 'limit' }, { id: 'rate', hide: isFree }]}
66+
columns={[{ id: 'resource' }, { id: 'limit' }, { id: 'rate', show: !isFree }]}
6767
let:root>
6868
<svelte:fragment slot="header" let:root>
6969
<Table.Header.Cell column="resource" {root}>Resource</Table.Header.Cell>

Diff for: src/lib/components/permissions/permissions.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
129129
const columns: Column[] = [
130130
{ id: 'role', width: { min: 100 } },
131-
{ id: 'create', width: { min: 100 }, hide: !withCreate },
131+
{ id: 'create', width: { min: 100 }, show: withCreate },
132132
{ id: 'read', width: { min: 100 } },
133133
{ id: 'update', width: { min: 100 } },
134134
{ id: 'delete', width: { min: 100 } },

Diff for: src/lib/components/viewSelector.svelte

+10-8
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
const prefs = preferences.getCustomCollectionColumns($page.params.collection);
3030
columns.set(
3131
$columns.map((column) => {
32-
column.show = prefs?.includes(column.id) ?? false;
32+
column.show = prefs?.includes(column.id) ?? true;
3333
return column;
3434
})
3535
);
@@ -40,7 +40,7 @@
4040
if (prefs?.columns) {
4141
columns.set(
4242
$columns.map((column) => {
43-
column.show = prefs.columns?.includes(column.id) ?? false;
43+
column.show = prefs.columns?.includes(column.id) ?? true;
4444
return column;
4545
})
4646
);
@@ -75,11 +75,13 @@
7575
});
7676
}
7777
78-
$: selectedColumnsNumber = $columns.reduce((acc, column) => {
79-
if (column.show === true) return acc;
78+
$: selectedColumnsNumber = $columns
79+
.filter((c) => !c?.exclude)
80+
.reduce((acc, column) => {
81+
if (column.show === true) return acc;
8082
81-
return ++acc;
82-
}, 0);
83+
return ++acc;
84+
}, 0);
8385
</script>
8486

8587
{#if !hideColumns && view === View.Table}
@@ -95,13 +97,13 @@
9597
<svelte:fragment slot="tooltip">
9698
<ActionMenu.Root>
9799
<Layout.Stack>
98-
{#each $columns as column}
100+
{#each $columns.filter((c) => !c?.exclude) as column}
99101
{#if !column?.exclude}
100102
<InputCheckbox
101103
id={column.id}
102104
label={column.title}
103105
on:change={() => (column.show = !column.show)}
104-
checked={!column.show}
106+
checked={column.show}
105107
disabled={allowNoColumns
106108
? false
107109
: selectedColumnsNumber <= 1 && column.show !== true} />

Diff for: src/lib/pages/domains/index.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
{ id: 'name' },
7979
{ id: 'verification' },
8080
{ id: 'certificate' },
81-
{ id: 'action', width: 20, hide: !$canWriteRules }
81+
{ id: 'action', width: 20, show: $canWriteRules }
8282
]}>
8383
<svelte:fragment slot="header" let:root>
8484
<Table.Header.Cell column="name" {root}>Name</Table.Header.Cell>

Diff for: src/routes/(console)/organization-[organization]/members/+page.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
{ id: 'email' },
8484
{ id: 'roles' },
8585
{ id: 'mfa' },
86-
{ id: 'actions', hide: !$isOwner, width: 40 }
86+
{ id: 'actions', show: $isOwner, width: 40 }
8787
]}>
8888
<svelte:fragment slot="header" let:root>
8989
<Table.Header.Cell column="name" {root}>Name</Table.Header.Cell>

Diff for: src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@
107107
<Table.Root
108108
columns={[
109109
{ id: 'project' },
110-
{ id: 'reads', hide: !databaseOperationMetric },
111-
{ id: 'writes', hide: !databaseOperationMetric },
112-
{ id: 'metric', hide: !!databaseOperationMetric },
110+
{ id: 'reads', show: !!databaseOperationMetric },
111+
{ id: 'writes', show: !!databaseOperationMetric },
112+
{ id: 'metric', show: !databaseOperationMetric },
113113
{ id: 'costs' }
114114
]}
115115
let:root>

Diff for: src/routes/(console)/project-[project]/functions/function-[function]/store.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const columns = writable<Column[]>([
8282
id: 'buildSize',
8383
title: 'Build size',
8484
type: 'integer',
85-
hide: true,
85+
show: false,
8686
filter: false,
8787
width: 80
8888
},

Diff for: src/routes/(console)/project-[project]/messaging/message-[message]/updateTargets.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
let:root
164164
columns={[
165165
{ id: 'target' },
166-
{ id: 'identifier', hide: !recipientsAvailable },
166+
{ id: 'identifier', show: recipientsAvailable },
167167
{ id: 'actions', width: 40 }
168168
]}>
169169
<svelte:fragment slot="header" let:root>

Diff for: src/routes/(console)/project-[project]/sites/(components)/logs.svelte

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import { Badge, Layout, Logs, Typography } from '@appwrite.io/pink-svelte';
2323
import LogsTimer from './logsTimer.svelte';
2424
25-
export let site: Models.Site;
2625
export let deployment: Models.Deployment;
2726
export let hideTitle = false;
2827
export let hideScrollButtons = false;

Diff for: src/routes/(console)/project-[project]/sites/create-site/deploying/+page.svelte

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
<Fieldset legend="Deploy">
6060
<Logs
6161
bind:deployment={data.deployment}
62-
bind:site={data.site}
6362
hideScrollButtons
6463
height="calc(100dvh - 430px)"
6564
emptyCopy="No logs available yet..." />

Diff for: src/routes/(console)/project-[project]/sites/site-[site]/deployments/deployment-[deployment]/+page.svelte

+1-6
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,7 @@
7474
open
7575
badgeType={badgeTypeDeployment(data.deployment.status)}
7676
hideDivider>
77-
<Logs
78-
site={data.site}
79-
deployment={data.deployment}
80-
hideTitle
81-
hideScrollButtons
82-
fullHeight />
77+
<Logs deployment={data.deployment} hideTitle hideScrollButtons fullHeight />
8378
<svelte:fragment slot="end">
8479
<LogsTimer status={data.deployment.status} deployment={data.deployment} />
8580
</svelte:fragment>

0 commit comments

Comments
 (0)