feat: stronger visual scoring differentiation + streak fix
Build & Deploy Tippspiel / build (push) Successful in 50s

- Exakt cards: gold glow border, gold banner, trophy emoji, larger animated badge
- Tendency: green accent (was blue), clearer differentiation from Exakt
- Falsch: muted gray, reduced opacity — clearly "lost"
- Profile tip history: solid gold/green/gray badges with distinct borders
- Streak: remove utc_date <= NOW() filter so dev-finished matches count; handle PostgreSQL boolean serialization

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ronny
2026-04-12 09:31:15 +02:00
parent 24edb0cec5
commit 3f757e712f
4 changed files with 48 additions and 29 deletions
+2 -2
View File
@@ -53,13 +53,13 @@ router.get('/', async (req: Request, res: Response): Promise<void> => {
`SELECT CASE WHEN t.id IS NOT NULL THEN true ELSE false END AS has_tip
FROM matches m
LEFT JOIN tips t ON t.match_id = m.id AND t.user_id = $1
WHERE m.utc_date <= NOW() AND m.status IN ('FINISHED', 'IN_PLAY')
WHERE m.status IN ('FINISHED', 'IN_PLAY')
ORDER BY m.utc_date DESC`,
[userId]
);
let streak = 0;
for (const m of pastMatches) {
if (m.has_tip) streak++;
if (m.has_tip === true || (m.has_tip as unknown) === 't' || (m.has_tip as unknown) === '1') streak++;
else break;
}