Merge pull request #2744 from appwrite/fix-SER-327-Activity-table-missing-hover-action

fix: added dualtimeView to other tables
This commit is contained in:
Harsh Mahajan
2025-12-31 11:39:17 +05:30
committed by GitHub
6 changed files with 25 additions and 12 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { AvatarInitials, PaginationWithLimit, Trim } from '$lib/components';
import { Container } from '$lib/layout';
import { toLocaleDateTime } from '$lib/helpers/date';
import DualTimeView from '$lib/components/dualTimeView.svelte';
import type { Models } from '@appwrite.io/console';
import { Layout, Table, Card, Empty } from '@appwrite.io/pink-svelte';
import Button from '$lib/elements/forms/button.svelte';
@@ -72,7 +72,7 @@
{log.ip}
</Table.Cell>
<Table.Cell column="date" {root}>
{toLocaleDateTime(log.time)}
<DualTimeView time={log.time} showDatetime />
</Table.Cell>
</Table.Row.Base>
{/each}
@@ -5,7 +5,6 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { identities } from './store';
import { toLocaleDateTime } from '$lib/helpers/date';
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
import { oAuthProviders } from '$lib/stores/oauth-providers';
@@ -82,7 +81,13 @@
<DualTimeView time={identity.$createdAt} />
</Table.Cell>
<Table.Cell column="expiryDate" {root}>
{toLocaleDateTime(identity.providerAccessTokenExpiry)}
{#if identity.providerAccessTokenExpiry}
<DualTimeView
time={identity.providerAccessTokenExpiry}
showDatetime />
{:else}
-
{/if}
</Table.Cell>
<Table.Cell column="actions" {root}>
<Button text on:click={() => deleteIdentity(identity.$id)}>
@@ -2,7 +2,7 @@
import { base } from '$app/paths';
import { page } from '$app/state';
import { Id } from '$lib/components';
import { toLocaleDateTime } from '$lib/helpers/date';
import DualTimeView from '$lib/components/dualTimeView.svelte';
import { columns } from './store';
import { IconExclamation } from '@appwrite.io/pink-icons-svelte';
import { Layout, Tooltip, Table, Icon } from '@appwrite.io/pink-svelte';
@@ -72,8 +72,10 @@
{`Last backup: ${lastBackup}`}
</span>
</Tooltip>
{:else if column.type === 'datetime'}
<DualTimeView time={database[column.id]} showDatetime />
{:else}
{toLocaleDateTime(database[column.id])}
{database[column.id]}
{/if}
</Table.Cell>
{/each}
@@ -2,7 +2,7 @@
import { base } from '$app/paths';
import { page } from '$app/state';
import { Empty, Id } from '$lib/components';
import { toLocaleDateTime } from '$lib/helpers/date';
import DualTimeView from '$lib/components/dualTimeView.svelte';
import { Container } from '$lib/layout';
import { Button } from '$lib/elements/forms';
import type { PageData } from './$types';
@@ -58,7 +58,11 @@
{:else if column.id === 'events'}
{webhook.events.length}
{:else if column.type === 'datetime'}
{webhook[column.id] ? toLocaleDateTime(webhook[column.id]) : '-'}
{#if webhook[column.id]}
<DualTimeView time={webhook[column.id]} showDatetime />
{:else}
-
{/if}
{:else if column.id === 'enabled'}
<Layout.Stack direction="row" gap="s" alignItems="normal">
<Status
@@ -1,7 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { page } from '$app/state';
import { timeFromNow, toLocaleDateTime } from '$lib/helpers/date';
import { timeFromNow } from '$lib/helpers/date';
import { Avatar, Icon, Layout, Popover, Table, Typography } from '@appwrite.io/pink-svelte';
import { columns } from './store';
import type { Models } from '@appwrite.io/console';
@@ -80,7 +80,7 @@
time={site?.latestDeploymentCreatedAt ?? site.$createdAt} />
{/if}
{:else if column.id === '$createdAt'}
{toLocaleDateTime(site[column.id])}
<DualTimeView time={site[column.id]} showDatetime />
{/if}
</Table.Cell>
{/each}
@@ -2,7 +2,7 @@
import { base } from '$app/paths';
import { page } from '$app/state';
import { Id } from '$lib/components';
import { toLocaleDateTime } from '$lib/helpers/date';
import DualTimeView from '$lib/components/dualTimeView.svelte';
import type { PageData } from './$types';
import { columns } from './store';
import { Table } from '@appwrite.io/pink-svelte';
@@ -30,8 +30,10 @@
{/key}
{:else if column.id === 'name'}
{bucket.name}
{:else if column.type === 'datetime'}
<DualTimeView time={bucket[column.id]} showDatetime />
{:else}
{toLocaleDateTime(bucket[column.id])}
{bucket[column.id]}
{/if}
</Table.Cell>
{/each}