Skip to content

Commit 53b874d

Browse files
committed
feat: implement client-side user management page functionality including data display, pagination, and user actions, and add a new header component.
1 parent f3c1497 commit 53b874d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/client/views/pages/users.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ type UserRow = {
77
name: string;
88
role: UserRole;
99
is_active: boolean;
10+
avatar?: string | null;
1011
last_login_at?: string | null;
1112
created_at?: string | null;
1213
};
@@ -190,9 +191,12 @@ function renderUsers() {
190191
</td>
191192
<td class="px-6 py-4">
192193
<div class="flex items-center gap-3">
193-
<div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-semibold">
194-
${user.name.charAt(0).toUpperCase()}
195-
</div>
194+
${user.avatar ?
195+
`<img src="${user.avatar}" alt="${user.name}" class="w-10 h-10 rounded-full object-cover">` :
196+
`<div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-semibold">
197+
${user.name.charAt(0).toUpperCase()}
198+
</div>`
199+
}
196200
<div>
197201
<div class="font-medium text-slate-900">${user.name}</div>
198202
<div class="text-sm text-foreground/60">@${user.username}</div>

0 commit comments

Comments
 (0)