Skip to content

Moderation panel redesign#65

Open
dowoge wants to merge 13 commits intomainfrom
moderation-panel-redesign
Open

Moderation panel redesign#65
dowoge wants to merge 13 commits intomainfrom
moderation-panel-redesign

Conversation

@dowoge
Copy link
Copy Markdown
Member

@dowoge dowoge commented May 10, 2026

This'll resolve #26, #36, #40 and #42

dowoge added 13 commits May 10, 2026 17:52
…rators, and server-owner tabs

Replaces the floating admin panel with a real route. Tabs gate by permission:
activity feed with stats, smart lookup that detects steam id / objectid,
moderator directory with per-mod drilldown and reverse window, and a new
server-owner self-invalidate surface for /so_moderate. Adds cross-page bulk
selection with named saved selections, and a recap-confirm step for ban,
unban, and reverse actions.
Adds describePermissions() that decodes the bitflag into labeled chips,
plus a shared PermissionBadges component. The moderation header now
shows them in place of the hex value, the lookup tab shows them on
player results, and they appear directly on player profile pages
whenever a user has any permission set.
per-row right-click toggle and visual ring; page select/clear button
in the times list header; tray mounted globally so selections persist
across navigation between maps, players, and the moderation panel.
old counter split on a single space-or-comma, while the parser used
[\s,]+ — pasting "id1, id2" reported a phantom invalid token. tokenize
once, derive valid/invalid from the same source, and show the first
few rejected tokens so the moderator can see what to fix.
unknown queries now go through autocomplete_players: a single match
auto-resolves to the profile, multiple matches present a candidate
picker. lookup writes the active query to ?q= on submit and reads it
back on mount, so /moderation?tab=lookup&q=… is shareable from chat.
…ity toggle

old kpis silently summarized "the last 20" while labelling cards "in
last 24h" / "restrictive" / "permissive" — misleading on busy days.
replaced with a single header that names the cap and a per-action-
type breakdown. added moderator and action multi-select filters
(persisted via localStorage), a comfortable/compact density toggle,
and a non-empty filtered-empty state with a clear-filters shortcut.
keyOf now includes the row index to avoid collisions on dup actions.
reverse window was confirmed sight-unseen — admin saw timeframe and
moderator name but no count or list of actions. compute the visible
slice from the already-loaded feed, surface it in the confirm dialog,
and flag when the feed is capped so the admin understands the actual
reversal may include more.
tablist now exposes role/aria-selected and supports Left/Right/Home/
End to switch tabs; tabpanel is properly labelled and focusable.
ConfirmActionDialog autofocuses cancel, listens for Esc to cancel and
Ctrl+Enter to confirm, and exposes role=dialog. moderator's own
header drops the per-bit permission badge wall in favour of a single
role label with the bitfield hex as a tooltip; container widens to
max-w-7xl since the moderator/feed views want the room.
TimesScope gains a 'server' kind that maps to the new ?server=<id>
parameter. ServerOwnerTab leads with browse-by-server: pick from your
owned servers, page through the runs, right-click or "Add page to
selection" to feed the global tray, then invalidate via SO Invalidate.
The paste-IDs flow is kept as a collapsible advanced section for IDs
sourced out of band.
/times?server= matches against records' server.key_id (the keyinfo
ObjectId), but /servers projects only the serverdata _id and the
keyinfo id isn't exposed anywhere a non-admin can reach. browsing by
serverdata _id silently returns no rows. keep the TimesScope.server
plumbing and getTimes wiring (correct and forward-compatible) and
restore the paste-only flow on this tab. once /servers exposes a key
id, the browse view drops back in.
ServerActivityResponse picks up the new key_id field, the SO browse
dropdown drives /times?server=<key_id>, and ServersView preserves
key_id when reconstructing entries after an edit. depends on the
matching api change on branch expose-key-id-on-servers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display player permissions/rank on profile

1 participant