7 Commits
Author SHA1 Message Date
CodingPhoenix ddaeccbea9 Nudge the WS status dot up 1px to line up with its label
top: 1px pushed the dot the wrong way; the label's glyphs sit slightly
above the flex centre line, so the dot needs to move up, not down, to
match.
2026-09-06 06:26:18 +02:00
CodingPhoenix 93a81fd82c Move competition back button onto the page with a real icon
The back button moves out of the topbar to the top-left of the page
above the competition name, and now renders an inline SVG arrow
(iconArrowLeft) instead of the "←" character.
2026-09-06 06:23:54 +02:00
CodingPhoenix 357888e310 Fix WebSocket status label not updating and move it into the topbar
The onopen/onclose handlers only toggled the CSS class on the status
dot, never the separate text span, so it stayed "offline" after a
reconnect. Replace the querySelector-based toggling with an
updateWsIndicator() helper that updates both the dot and its label
from stored element refs.

The indicator now lives in the topbar (via renderTopbar's extra slot)
instead of next to the competition name, with its own .ws-indicator
flex wrapper so the dot and label line up vertically.
2026-09-06 06:23:42 +02:00
CodingPhoenix ae035c3fd4 Add System Admin area and redesign Competitions page
Move the Users table and add a new rule-text editor into a dedicated
admin.html/admin.js page with its own collapsible sidebar (Users,
Rules categories), reachable only for system admins via a button next
to the brand. The Competitions page no longer renders admin-only
controls inline.

Competitions page: cards are now fully clickable to open the
competition (drop the separate "Open" button), the admin-only delete
action moves into a "..." menu (new generic openInlineMenu/
openAnchoredPopover helpers in common.js), and add an open/closed
filter.

Topbar: language switch and logout move out of the topbar into a
small popup under the profile button, which itself opens the full
settings modal for username/display name/language/password.
2026-09-05 13:33:05 +02:00
CodingPhoenix e077703d5d Fix rules CSV parsing and add rule text editing API
Strip a leading UTF-8 BOM before parsing rule CSVs (it was causing the
header row to be misread as a rule) and skip rows that clearly failed
CSV parsing (e.g. a whole line landing in the rule_number field after
a spreadsheet app double-encoded a quoted cell) instead of silently
loading garbage.

Add PUT /api/rules/{lang}/{number} and GET /api/rules/numbers so rule
text, suggested penalty and escalation mode can be edited per language
from the admin UI, always writing the CSV back out with correct
quoting via encoding/csv. Also fixes two bugs found while wiring this
up: rulesDir() ignored the configured rules_dir (falling back to a
RULES_DIR env var that's never set), and the CORS middleware didn't
allow PUT.
2026-09-05 13:32:46 +02:00
CodingPhoenix 4b5f0eb326 Added index.js 2026-05-18 06:38:10 +00:00
CodingPhoenix 26c821866b Removed inline JS 2026-05-18 06:37:52 +00:00