Staff playtime figures on the staff panel only

Signed-in staff now see the public Playtime page and player drawers as
everyone else does; the staff panels, names, sessions and locations stay
on /admin#playtime and its drawers. The public API no longer sends them.
This commit is contained in:
Astra 2026-10-05 12:35:14 +01:00
parent ba61708bed
commit 9aeea45130
5 changed files with 22 additions and 23 deletions

View file

@ -1,11 +1,11 @@
// Public, read-only site: the live server, bans, gags/mutes, staff with their rank changes, and
// playtime (playtime.js). The API leaves out who issued penalties and IPs; nothing here can change
// anything. Signed-in staff with @css/generic also see staff playtime figures here.
// anything. Signed-in staff see the same as everyone; their extras are on the staff panel.
const PAGES = [
{ id: "server", label: "Server" },
// Once PlaytimeHistory has recorded something, or for staff who see its staff figures.
{ id: "playtime", label: "Playtime", show: () => state.me?.playtime === "on" || !!state.me?.playtimeStaff },
// Once PlaytimeHistory has recorded something. Staff figures are on the staff panel only.
{ id: "playtime", label: "Playtime", show: () => state.me?.playtime === "on" },
{ id: "bans", label: "Bans" },
{ id: "comms", label: "Gags & Mutes" },
{ id: "staff", label: "Staff" },