feat: improve users page with inline staff actions and commandocentrum cleanup
This commit is contained in:
1 parent
d588ae5f0f
commit
beb36d2dbf
3 files changed
+297
-6
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -9,7 +9,7 @@ const PER_PAGE = 25;
|
|||||||
export default async function AdminUsers({
|
export default async function AdminUsers({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
searchParams: Promise<{ q?: string; page?: string }>;
|
searchParams: Promise<{ q?: string; page?: string; form?: string }>;
|
||||||
}) {
|
}) {
|
||||||
const sp = await searchParams;
|
const sp = await searchParams;
|
||||||
const q = (sp.q ?? "").trim();
|
const q = (sp.q ?? "").trim();
|
||||||
@@ -79,6 +79,7 @@ export default async function AdminUsers({
|
|||||||
<th>Rank</th>
|
<th>Rank</th>
|
||||||
<th>Credits</th>
|
<th>Credits</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -95,6 +96,29 @@ export default async function AdminUsers({
|
|||||||
{u.online === "1" ? "online" : "offline"}
|
{u.online === "1" ? "online" : "offline"}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in new issue
Block a user