add new storage usage column

This commit is contained in:
Harsh Mahajan
2026-01-01 15:50:46 +05:30
parent cc18abda18
commit d249fc83bf
2 changed files with 6 additions and 2 deletions
@@ -3,7 +3,8 @@ import { writable } from 'svelte/store';
export const columns = writable<Column[]>([
{ id: '$id', title: 'Bucket ID', type: 'string', width: 200 },
{ id: 'name', title: 'Name', type: 'string', width: { min: 120 } },
{ id: 'name', title: 'Name', type: 'string', width: { min: 200 } },
{ id: 'storageUsage', title: 'Storage usage', type: 'integer', width: 220 },
{ id: '$createdAt', title: 'Created', type: 'datetime', width: { min: 120 } },
{ id: '$updatedAt', title: 'Updated', type: 'datetime', width: { min: 120 } }
]);
@@ -8,6 +8,7 @@
import { Table, Badge, Layout, Popover, Typography } from '@appwrite.io/pink-svelte';
import { goto } from '$app/navigation';
import Link from '$lib/elements/link.svelte';
import { calculateSize } from '$lib/helpers/sizeConvertion';
export let data: PageData;
@@ -48,8 +49,10 @@
</Id>
{/key}
{:else if column.id === 'name'}
{bucket.name}
{:else if column.id === 'storageUsage'}
<Layout.Stack direction="row" gap="s" alignItems="center">
<span>{bucket.name}</span>
<span>{calculateSize(0)}</span>
{#if bucket.transformations}
<Popover let:show let:hide placement="bottom-start" portal>
<span