1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-15 23:16:11 +00:00

feat: add various improvements to the table component (#961)

Co-authored-by: Kyle Mendell <kmendell@ofkm.us>
This commit is contained in:
Elias Schneider
2025-10-13 11:12:55 +02:00
committed by GitHub
parent 24ca6a106d
commit c20e93b55c
76 changed files with 1948 additions and 1434 deletions

View File

@@ -6,15 +6,11 @@
import { m } from '$lib/paraglide/messages';
import AuditLogService from '$lib/services/audit-log-service';
import type { AuditLogFilter } from '$lib/types/audit-log.type';
import { eventTypes as eventTranslations } from '$lib/utils/audit-log-translator';
import AuditLogSwitcher from '../audit-log-switcher.svelte';
import {eventTypes as eventTranslations} from "$lib/utils/audit-log-translator";
let { data } = $props();
const auditLogService = new AuditLogService();
let auditLogs = $state(data.auditLogs);
let requestOptions = $state(data.requestOptions);
let auditLogListRef: AuditLogList;
let filters: AuditLogFilter = $state({
userId: '',
@@ -29,10 +25,6 @@
});
const eventTypes = $state(eventTranslations);
$effect(() => {
auditLogService.listAllLogs(requestOptions, filters).then((response) => (auditLogs = response));
});
</script>
<svelte:head>
@@ -124,7 +116,6 @@
{/await}
</div>
</div>
<AuditLogList isAdmin={true} {auditLogs} {requestOptions} />
<AuditLogList bind:this={auditLogListRef} isAdmin {filters} />
</Card.Content>
</Card.Root>