Skip to content

Commit 1b095d1

Browse files
committed
refac: admin user list active indicator
1 parent 0518749 commit 1b095d1

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/lib/components/admin/Users/UserList.svelte

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,14 +355,25 @@
355355
</button>
356356
</td>
357357
<td class="px-3 py-1 font-medium text-gray-900 dark:text-white max-w-48">
358-
<div class="flex items-center">
358+
<div class="flex items-center gap-2">
359359
<img
360-
class="rounded-full w-6 h-6 object-cover mr-2.5 flex-shrink-0"
360+
class="rounded-full w-6 h-6 object-cover mr-0.5 flex-shrink-0"
361361
src={`${WEBUI_API_BASE_URL}/users/${user.id}/profile/image`}
362362
alt="user"
363363
/>
364364

365365
<div class="font-medium truncate">{user.name}</div>
366+
367+
{#if user?.last_active_at && Date.now() / 1000 - user.last_active_at < 180}
368+
<div>
369+
<span class="relative flex size-1.5">
370+
<span
371+
class="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-400 opacity-75"
372+
></span>
373+
<span class="relative inline-flex size-1.5 rounded-full bg-green-500"></span>
374+
</span>
375+
</div>
376+
{/if}
366377
</div>
367378
</td>
368379
<td class=" px-3 py-1"> {user.email} </td>

0 commit comments

Comments
 (0)