Commit graph

20 commits

Author SHA1 Message Date
c7fbff0e43 Playtime: average over the days recorded, full bars for leaders under an hour
Busiest hours and the heatmap averaged over 30 days (4 weeks) even when
recording began yesterday; they now use only the days since it began, and
say so. Bars capped their scale at 1, so a leader with 0.5 h got half a
bar. The hours tile keeps a decimal under 10, and K/D shows - with no
kills or deaths yet.
2026-10-04 22:24:37 +01:00
f659859d66 No Verified tags on the public site
The public scoreboard and player pages no longer show or receive whether
a player is verified. The staff panel still does.
2026-10-04 22:16:42 +01:00
7004945d49 Playtime records from pt_events; sticky top bar, page scroll locked under the drawer
Records: the most bomb plants, defuses, knife, Zeus and headshot kills for
the last 7 days, 30 days or all time, and each player's counts, when
PlaytimeHistory 0.2.0's pt_events is there. The public site's top bar now
sticks the whole way down, Playtime comes after Server, and only the
player drawer scrolls while it's open.
2026-10-04 21:37:42 +01:00
6d0fc6e463 Playtime from PlaytimeHistory's database (SAW_PT_DSN)
A public Playtime tab and player-drawer playtime, and staff-only figures
(who's on, staff activity, disconnect reasons, countries, names, sessions)
for @css/generic on the staff panel and on the public site when signed in.
Hidden unless SAW_PT_DSN is set and its tables are there.
2026-10-04 21:05:57 +01:00
daa7ec2dbc Settings rows on phones: switches level with the name, boxes as form fields 2026-10-03 14:25:51 +01:00
3c0655b512 Notifications page: switches before the text on phones, one Coming later tag 2026-10-03 14:14:16 +01:00
5863639e1a Notifications page: one list of toggles, without group headings 2026-10-03 14:11:27 +01:00
a6960c25a2 Notifications page: count all devices, saying whether this one is included 2026-10-03 14:08:33 +01:00
17232bd5a2 Staff push notifications, and revalidate embedded assets
Notifications: staff turn them on per device from a new Notifications page,
pick each type (bans, gags, mutes and silences added or lifted, server down
and back up) and quiet hours. A watcher polls SimpleAdmin's tables, so in-game
penalties are sent too. Web Push with VAPID and RFC 8291 encryption in
internal/push, standard library only. Tables in sql/push.sql, created at
startup; the VAPID key is made on first start and kept in saw_settings.
Penalty notifications link to the public list searching for the player
(#bans?q=<steamid64>). The Android app delegates notifications (versionCode 3).

Caching: pages, scripts and styles are served with Cache-Control: no-cache
and an ETag, so a deploy shows up at once instead of after Cloudflare's
default 4-hour browser cache.
2026-10-03 13:49:40 +01:00
44708d5f3c Installable as an app (PWA): manifests, offline-only service worker, icons 2026-10-03 12:22:33 +01:00
b26360e8f3 Console panel, collapsible panels, Add on the Members panel
- Server settings > Console sends a raw console command for staff with @css/rcon
  (POST /api/admin/rcon). It doesn't wait for the server; the output is only logged.
- Staff & ranks and Server settings panels fold up by clicking their heads. All but
  Ranks and Server start folded; a folded Ranks panel shows the selected rank.
- The Members panel has an Add button that opens Add staff with that rank picked.
- The public rank log shows a rank being given as Promoted and taken away as Demoted.
2026-10-03 12:09:43 +01:00
31901495de Verification form: buttons in line with the inputs, shorter help text
The help text sat inside each field, so the buttons lined up with it rather than the inputs, and
its long unbroken URL made the page too wide on phones. It's now one short line under the row.
2026-10-02 20:18:39 +01:00
3c62874f91 Verification: clan tag setting, GroupVerify 0.3.0 wording
Root sets GroupVerify's clan_tag (the scoreboard tag CS2-Tags gives verified players without a
rank) next to the Steam group. Validated like the plugin (12 UTF-16 units, no quotes, ; or \),
saved to gv_settings and sent as css_gv_clantag when the plugin is loaded. Only changed fields
are sent.

GroupVerify 0.3.0 checks players with the Steam Web API as they join, so the group list is now
"Confirmed group members" with first/last confirmed dates.
2026-10-02 18:44:44 +01:00
9e4bc63201 GroupVerify: Verification page, overrides and public Verified tags
Shown only where GroupVerify is: staff get the Verification page once its gv_* tables are in
the database, and the public site shows "Verified" only while it's on (enabled, with a group)
and not missing from css_plugins list, which the poller reads once a minute over RCON.

- Verification page: plugin state and version, Steam group, saved member list, overrides.
- Overrides (@zio/verify, not on yourself unless Root): give, change, remove; player drawer
  shows why a player is or isn't verified.
- Root sets the group and turns it on/off: saved to gv_settings, and sent as css_gv_* when the
  plugin is loaded so it applies at once.
- gv_* times use GroupVerify's own timezone setting.
- MySQL integration test (SAW_TEST_DSN), unit tests for plugin list parsing and the show rule.
2026-10-02 17:59:26 +01:00
b2b4698776 Gate the Staff & ranks page behind @zio/webpanel
Staff without @zio/webpanel (or @css/root) no longer see the page: the API refuses it and the
panel leaves it out of the sidebar. The flag is offered in the rank editor.
2026-09-29 19:08:25 +01:00
611b79cdba Public rank change log: sa_rank_log, written on rank changes, listed on the Staff page 2026-09-29 16:56:37 +01:00
861692c534 Staff avatars from Steam, cached in memory
The public staff page, the staff panel's staff list and the signed-in badge show each member's
Steam avatar over their initial. The panel fetches it from the profile XML (no Web API key),
keeps it in memory for a day (failures for an hour, one shared fetch per player) and serves it
from /avatar/<steamid> with a day's browser caching, so the CSP stays img-src 'self' and
visitors never contact Steam. Only SimpleAdmin admins are served; anything else falls back to the
initial.
2026-09-28 11:36:05 +01:00
6324fc7f81 Names on offline penalties, mobile menu close, player drawer tidy, IP-ban bypass flag
Bans and comms saved without a player name (SimpleAdmin's offline css_addban etc.) show the
player's latest name from sa_players_ips, and the panel writes that name onto new rows it claims.
The mobile sidebar closes from a Close button, the backdrop or Escape, since it covers the Menu
button. The public player drawer drops "Right now" and "Free to play and talk." and puts the
Steam profile link after the SteamID. Adds @css/bypassipban to the permission checkboxes.
2026-09-28 11:23:14 +01:00
b579941964 Scoreboard: label warmup and round scores, count players and bots per team
The score caption says "Warmup, no rounds yet" during warmup and "Rounds
won, T vs CT" otherwise. Each team panel on the public page shows its
player and bot count, and its score as rounds won, or a Warmup label
during warmup. The top navigation scrolls sideways on narrow screens
instead of overflowing.
2026-09-27 15:37:37 +01:00
4f38daf0e6 simpleadmin-web 0.1.0: web panel for CS2-SimpleAdmin 2026-09-25 20:08:14 +01:00