Show and revoke registered agents under Admin
An agent that registered itself was invisible, and withdrawing one meant deleting rows or rotating the signing key. It now sits next to Users, with the live-token count that tells an approved agent from one that only registered. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H7LwYgJfpkbLCTeiAf8U4A
This commit is contained in:
@@ -5,8 +5,10 @@ import { Suspense } from "react"
|
||||
import { type UserPublic, UsersService } from "@/client"
|
||||
import AddUser from "@/components/Admin/AddUser"
|
||||
import { columns, type UserTableData } from "@/components/Admin/columns"
|
||||
import OAuthClients from "@/components/Admin/OAuthClients"
|
||||
import { DataTable } from "@/components/Common/DataTable"
|
||||
import PendingUsers from "@/components/Pending/PendingUsers"
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
||||
import useAuth from "@/hooks/useAuth"
|
||||
|
||||
function getUsersQueryOptions() {
|
||||
@@ -56,18 +58,29 @@ function UsersTable() {
|
||||
}
|
||||
|
||||
function Admin() {
|
||||
// Agents get in through the same door as people, so they are administered
|
||||
// next to them rather than in a screen of their own.
|
||||
return (
|
||||
<div className="flex flex-col gap-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">Users</h1>
|
||||
<p className="text-muted-foreground">
|
||||
Manage user accounts and permissions
|
||||
</p>
|
||||
<Tabs defaultValue="users" className="flex flex-col gap-6">
|
||||
<TabsList>
|
||||
<TabsTrigger value="users">Users</TabsTrigger>
|
||||
<TabsTrigger value="agents">Agents</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="users" className="flex flex-col gap-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">Users</h1>
|
||||
<p className="text-muted-foreground">
|
||||
Manage user accounts and permissions
|
||||
</p>
|
||||
</div>
|
||||
<AddUser />
|
||||
</div>
|
||||
<AddUser />
|
||||
</div>
|
||||
<UsersTable />
|
||||
</div>
|
||||
<UsersTable />
|
||||
</TabsContent>
|
||||
<TabsContent value="agents">
|
||||
<OAuthClients />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user