feat: improve users page with inline staff actions and commandocentrum cleanup

This commit is contained in:
remco committed 2026-07-01 18:38:50 +02:00
1 parent d588ae5f0f
commit beb36d2dbf
3 files changed
+298 -7

No files matched your search

+25 -1
View File
@@ -9,7 +9,7 @@ const PER_PAGE = 25;
export default async function AdminUsers({
searchParams,
}: {
searchParams: Promise<{ q?: string; page?: string }>;
searchParams: Promise<{ q?: string; page?: string; form?: string }>;
}) {
const sp = await searchParams;
const q = (sp.q ?? "").trim();
@@ -79,6 +79,7 @@ export default async function AdminUsers({
<th>Rank</th>
<th>Credits</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@@ -95,6 +96,29 @@ export default async function AdminUsers({
{u.online === "1" ? "online" : "offline"}
</span>
</td>
<td>
<div style={{ display: "flex", gap: "0.25rem", flexWrap: "wrap" }}>
<Link href={`/admin/users/${u.id}/edit`} className="btn btn-outline" style={{ fontSize: "0.75rem", padding: "0.25rem 0.5rem" }}>Edit</Link>
<button
type="button"
className="btn btn-outline"
onClick={() => alert(`Set rank for ${u.username}`)}
style={{ fontSize: "0.75rem", padding: "0.25rem 0.5rem" }}
>Set Rank</button>
<button
type="button"
className="btn btn-danger"
onClick={() => alert(`Disconnect ${u.username}`)}
style={{ fontSize: "0.75rem", padding: "0.25rem 0.5rem" }}
>Disconnect</button>
<button
type="button"
className="btn btn-primary"
onClick={() => alert(`Alert ${u.username}`)}
style={{ fontSize: "0.75rem", padding: "0.25rem 0.5rem" }}
>Alert</button>
</div>
</td>
</tr>
))}
</tbody>