mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
feat(users): show last-access timestamp per user
Maps Navidrome's lastAccessAt onto NdUser and renders it in the User Management row as a localized relative time (Intl.RelativeTimeFormat with the current i18n language). Tooltip carries the absolute timestamp. Navidrome returns 0001-01-01 for never-accessed users — detected and shown as the localized "Never" label. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ export interface NdUser {
|
||||
isAdmin: boolean;
|
||||
libraryIds: number[];
|
||||
lastLoginAt?: string | null;
|
||||
lastAccessAt?: string | null;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
@@ -56,6 +57,7 @@ export async function ndListUsers(serverUrl: string, token: string): Promise<NdU
|
||||
isAdmin: !!o.isAdmin,
|
||||
libraryIds: extractLibraryIds(o),
|
||||
lastLoginAt: (o.lastLoginAt as string | null | undefined) ?? null,
|
||||
lastAccessAt: (o.lastAccessAt as string | null | undefined) ?? null,
|
||||
createdAt: o.createdAt as string | undefined,
|
||||
updatedAt: o.updatedAt as string | undefined,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user