forked from open-webui/open-webui
feat: user last active
This commit is contained in:
parent
01c4647dfc
commit
9094536d37
5 changed files with 118 additions and 5 deletions
|
@ -5,6 +5,8 @@
|
|||
import { onMount, getContext } from 'svelte';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
import { toast } from 'svelte-sonner';
|
||||
|
||||
|
@ -164,6 +166,8 @@
|
|||
<th scope="col" class="px-3 py-2"> {$i18n.t('Name')} </th>
|
||||
<th scope="col" class="px-3 py-2"> {$i18n.t('Email')} </th>
|
||||
<th scope="col" class="px-3 py-2"> {$i18n.t('Created at')} </th>
|
||||
<th scope="col" class="px-3 py-2"> {$i18n.t('Last Active')} </th>
|
||||
|
||||
<th scope="col" class="px-3 py-2 text-right" />
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -221,7 +225,11 @@
|
|||
<td class=" px-3 py-2"> {user.email} </td>
|
||||
|
||||
<td class=" px-3 py-2">
|
||||
{dayjs(user.timestamp * 1000).format($i18n.t('MMMM DD, YYYY'))}
|
||||
{dayjs(user.created_at * 1000).format($i18n.t('MMMM DD, YYYY'))}
|
||||
</td>
|
||||
|
||||
<td class=" px-3 py-2">
|
||||
{dayjs(user.last_active_at * 1000).fromNow()}
|
||||
</td>
|
||||
|
||||
<td class="px-3 py-2 text-right">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue