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

@ -52,7 +52,7 @@ RCON. Without it the panel still works, but shows the server as offline and can'
| Raw console commands (Server settings > Console; sent without waiting, output only logged) | `@css/rcon` |
| See the Staff & ranks page | `@zio/webpanel` |
| Give and remove verification overrides | `@zio/verify` (not on themselves, unless Root) |
| Staff playtime figures (Playtime page, player drawers, and on the public site when signed in) | `@css/generic` |
| Staff playtime figures (the staff panel's Playtime page and player drawers) | `@css/generic` |
| PlaytimeHistory's own status on the Playtime page | `@css/root` |
| Ranks, staff, SimpleAdmin settings, reload admins, GroupVerify's group and on/off | `@css/root` |
@ -174,11 +174,12 @@ SAW_PT_DSN=pt_web:<password>@tcp(<db-host>:3306)/playtime_history
are between players only, from `pt_events`: kills of bots, deaths to bots and suicides don't
count, so they start with PlaytimeHistory 0.2.0.
- **Staff** with `@css/generic` (PlaytimeHistory's own default for looking up others) get, on the
staff panel's Playtime page and on the public site while signed in: who's on now with how long,
team, ping and location; each staff member's time in the last 7 or 30 days; disconnect reasons;
countries; and in player drawers, the names they've used, recent sessions and location.
Root also sees whether the plugin is loaded and what `css_pt_status` says. Who's on comes from
the live status, so admins hidden with `css_hide` stay hidden.
staff panel only (its Playtime page, `/admin#playtime`, and its player drawers): who's on now
with how long, team, ping and location; each staff member's time in the last 7 or 30 days;
disconnect reasons; countries; and the names a player has used, their recent sessions and
location. Root also sees whether the plugin is loaded and what `css_pt_status` says. Who's on
comes from the live status, so admins hidden with `css_hide` stay hidden. Signed in or not,
the public site shows everyone the same.
- **Days and hours of the day** are in the viewer's own time zone (the browser sends it). An hour
goes to the day it starts on, which is exact for zones a whole number of hours from UTC.
- **Locations** come from DB-IP City Lite, credited (CC BY 4.0) wherever they're shown. No IP