diff --git a/web/src/lib/components/admin/UserModal.svelte b/web/src/lib/components/admin/UserModal.svelte index c80b37b1..77531da2 100644 --- a/web/src/lib/components/admin/UserModal.svelte +++ b/web/src/lib/components/admin/UserModal.svelte @@ -19,6 +19,7 @@ import { tick } from 'svelte'; import type { AdminUser } from '$lib/stores/admin.svelte'; import UserSettingsForm from './UserSettingsForm.svelte'; + import UserWorkspacesTab from './UserWorkspacesTab.svelte'; export type UserModalTab = 'overview' | 'workspaces' | 'activity' | 'settings'; @@ -223,7 +224,7 @@ {#if t.key === 'overview'}

Overview tab content arrives in TASK-1553.

{:else if t.key === 'workspaces'} -

Workspaces tab content arrives in TASK-1552.

+ {:else if t.key === 'activity'}

Activity tab content arrives in TASK-1554.

{:else if t.key === 'settings'} diff --git a/web/src/lib/components/admin/UserWorkspacesTab.svelte b/web/src/lib/components/admin/UserWorkspacesTab.svelte new file mode 100644 index 00000000..143376ab --- /dev/null +++ b/web/src/lib/components/admin/UserWorkspacesTab.svelte @@ -0,0 +1,251 @@ + + + +{#if loading} +
Loading workspaces…
+{:else if loadError} +
{loadError} + +
+{:else if workspaces.length === 0} +
This user has no workspaces.
+{:else} +
+ + + + + + + + + + + + + + {#each visible as ws (ws.workspace_id)} + + + + + + + + + + {/each} + +
WorkspaceRoleCollectionsItems (open / total)MembersStorageLast activity
+ + {ws.workspace_name} + +
{ws.workspace_slug}
+
{ws.role}{ws.collections_count}{ws.items_open} / {ws.items_total}{ws.members_count}{formatStorageBytes(ws.storage_bytes)}{relativeTime(ws.last_activity_at)}
+
+ {#if overflow > 0 && !showAll} + + {/if} +{/if} + +