Commit Graph

19 Commits

Author SHA1 Message Date
e772fb5cc0 feat: time-based credits, JUGADORES leaderboard, fix footer visibility
- Credits system: 1€/day, 5€/week, 15€/month time-based access via Redsys
  - credits table with token, tier, expires_at, status lifecycle
  - /api/credito/iniciar, /api/credito/estado, /api/pregunta/enviar endpoints
  - Polling-based token delivery to browser after Redsys URLOK redirect
  - localStorage token storage with expiry check on load
- JUGADORES leaderboard: top 7 players by questions used, polled every 60s
  - /api/jugadores endpoint, PlayerLeaderboard component in Standings sidebar
- Footer: moved into Standings sidebar (.standings__footer) so it's always visible
- pregunta.tsx: complete redesign with tier cards, credit badge, spinner, success state
- pregunta.css: new styles for tier cards, input, badge, spinner, success, link-btn

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 14:43:25 +01:00
2fac92356d feat: footer, auto-pause on no viewers, and Redsys question submissions
- Footer: add site-footer with one-liner + Cloud Host branding linking to cloudhost.es (mobile only, hidden on desktop)
- Auto-pause: game pauses automatically after AUTOPAUSE_DELAY_MS (default 60s) with no viewers connected; auto-resumes when first viewer connects; shows "Esperando espectadores…" in the UI
- Redsys: new /pregunta page lets viewers pay 1€ via Redsys to submit a fill-in question; submitted questions are used as prompts in the next round instead of AI generation; new redsys.ts implements HMAC_SHA256_V1 signing (3DES key derivation + HMAC-SHA256); notification endpoint at /api/redsys/notificacion handles server-to-server confirmation
- db.ts: questions table with createPendingQuestion / markQuestionPaid / getNextPendingQuestion / markQuestionUsed
- .env.sample: added AUTOPAUSE_DELAY_MS, PUBLIC_URL, REDSYS_* vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 14:03:30 +01:00
2abea42c18 feat: convert to argument.es — Spanish, vote buttons, Docker
- Translate all ~430 prompts to Spanish with cultural adaptations
- Translate all UI strings (frontend, admin, history, broadcast)
- Translate AI system prompts; models now respond in Spanish
- Replace Twitch/Fossabot viewer voting with in-site vote buttons
- Add POST /api/vote endpoint (IP-based, supports vote switching)
- Vote buttons appear during voting phase with active state highlight
- Rename project to argument.es throughout (package.json, cookie, DB)
- Add docker-compose.yml with SQLite volume mount
- Add .env.sample documenting all required and optional vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 13:09:00 +01:00
Theo Browne
79f9dab7fb new layout for model rankings 2026-02-22 18:44:49 -08:00
Theo Browne
41deee807a fossabot setup 2026-02-22 18:25:15 -08:00
Theo Browne
d80c40ed3f ui fixes 2026-02-22 17:52:37 -08:00
Theo Browne
6e98a183ac ip specific votes + ui fixes 2026-02-22 17:45:08 -08:00
Theo Browne
e7d1cb3bf7 Vote fixing 2026-02-22 17:33:52 -08:00
Theo Browne
845065ac8f voting why not lol 2026-02-22 17:22:59 -08:00
Theo Browne
dc9ac4e7c8 admin and higher limits 2026-02-22 01:20:19 -08:00
Theo Browne
4786fcfedb fix layout a bit 2026-02-22 00:25:50 -08:00
Theo Browne
1ab21883fb View counter 2026-02-22 00:11:20 -08:00
Theo Browne
77f68d440c logo, fix db loading 2026-02-20 04:49:40 -08:00
Theo Browne
4c4d21a726 better page layout 2026-02-20 02:55:40 -08:00
Theo Browne
104eb8e73e game progress 2026-02-20 02:49:19 -08:00
Theo Browne
6bd3718cad better 2026-02-20 00:28:48 -08:00
Theo Browne
c9d68d58eb more complete 2026-02-19 23:40:03 -08:00
Theo Browne
ce1ef83926 Better frontend kind of 2026-02-19 23:28:03 -08:00
Theo Browne
bca390ae75 web version 2026-02-19 22:46:41 -08:00