Add self-info endpoint for ProjectConfigurator discovery, sync shared updates
GET /api/info reports name/tabs/mount types (empty - state lives in Postgres, no shared file mounts) so ProjectConfigurator's Projects workspace can register this instance from just a URL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
557a61b4ee
commit
bbf5d8bb05
126 files changed
+2897
-8542
No files matched your search
@@ -45,6 +45,12 @@
|
||||
return canAssignAdmin && role ? role : 'user';
|
||||
}
|
||||
|
||||
function formatLastLogin(value: string | null | undefined): string {
|
||||
if (!value) return 'Never';
|
||||
const parsed = new Date(value);
|
||||
return Number.isNaN(parsed.getTime()) ? 'Never' : parsed.toLocaleString();
|
||||
}
|
||||
|
||||
async function loadUsers(): Promise<void> {
|
||||
if (!onList || !canManage) return;
|
||||
loading = true;
|
||||
@@ -183,6 +189,7 @@
|
||||
<div class="sc-user-row">
|
||||
<div><strong>{user.username}</strong><span>{user.email}</span></div>
|
||||
<span class="sc-user-role">{user.role}</span>
|
||||
<span class="sc-muted sc-user-last-login" title="Last login">{formatLastLogin(user.lastLoginAt)}</span>
|
||||
<div class="sc-user-actions">
|
||||
<Button disabled={saving} size="sm" type="button" variant="secondary" onclick={() => startEditing(user)}>Edit</Button>
|
||||
<Button disabled={saving || String(user.id) === String(currentUserId) || user.role === 'superadmin'} size="sm" type="button" variant="danger" onclick={() => void deleteUser(user)}>Remove</Button>
|
||||
|
||||
@@ -800,6 +800,12 @@
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.sc-user-last-login {
|
||||
flex-shrink: 0;
|
||||
font-size: 0.8rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sc-user-actions {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
|
||||
@@ -56,6 +56,8 @@ export interface ManagedUser {
|
||||
totpEnabled?: boolean;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
/** Null/undefined means the account has never completed a login. */
|
||||
lastLoginAt?: string | null;
|
||||
}
|
||||
|
||||
export interface UserCreateInput {
|
||||
|
||||
Reference in new issue
Block a user