diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 207af9f..06bc99f 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -161,7 +161,7 @@ function ParticipantNames({ participants }) {
{participants.map((participant) => ( {participant.name} @@ -2781,6 +2781,14 @@ function TeamProfilePage({ navigate, profile, requestedTeam, teams }) { const SCOREBOARD_GRID = 'grid-cols-[minmax(220px,1fr)_repeat(6,minmax(52px,72px))]' +// Battle-log lines are prefixed +/-/ for winner/loser/neither (matching +// the Discord diff format), so colour each line by its acting team. +function battleLineColor(line) { + if (line.startsWith('+')) return 'text-win' + if (line.startsWith('-')) return 'text-loss' + return 'text-text-soft' +} + function GamePage({ gameId, navigate }) { const [gameState, setGameState] = useState({ status: 'loading', data: null, error: null }) const [logs, setLogs] = useState({ chat_log: [], battle_log: [] }) @@ -2968,16 +2976,18 @@ function GamePage({ gameId, navigate }) { {logs.battle_log.length ? (
Battle Log -
-            {logs.battle_log.join('\n')}
-          
+
+ {logs.battle_log.map((line, i) => ( +
{line}
+ ))} +
) : null} {logs.chat_log.length ? (
Chat Log -
+          
             {logs.chat_log.join('\n')}
           
diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 84d8659..b0c9e20 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -133,6 +133,13 @@ "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif; } +/* Chat/battle logs: monospace for column alignment, with skyquake before the + generic keyword so country/event glyphs still resolve per-character. */ +.log-mono { + font-family: + ui-monospace, SFMono-Regular, Menlo, Consolas, "skyquakesymbols", monospace; +} + body { margin: 0; min-width: 320px;