feat: users answer alongside AI instead of proposing questions
- Core mechanic change: users now submit answers to the live prompt, competing alongside AI models; answers broadcast to all viewers - New pricing (no time limit, pure count-based, refillable): 0,99€ = 10 resp · 9,99€ = 300 resp · 19,99€ = 1000 resp - DB: new user_answers table; submitUserAnswer() atomically validates credit, inserts answer, decrements budget; JUGADORES leaderboard now scores by user_answers count - server: /api/respuesta/enviar endpoint; credit activation sets expires_at 10 years out (effectively no expiry); answers injected into live round state and broadcast via WebSocket - frontend: ProposeAnswer widget shows current prompt, textarea active during answering phase, tracks per-round submission state; Arena shows Respuestas del público section live Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
48
frontend.css
48
frontend.css
@@ -769,7 +769,53 @@ body {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ── Propose Question widget ─────────────────────────────────── */
|
||||
/* ── User answers (audience) ─────────────────────────────────── */
|
||||
|
||||
.user-answers {
|
||||
margin-top: 20px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.user-answers__label {
|
||||
font-family: var(--mono);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1.5px;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.user-answers__list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.user-answer {
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.user-answer__name {
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.user-answer__sep {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.user-answer__text {
|
||||
color: var(--text-dim);
|
||||
font-family: var(--serif);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* ── Propose Answer widget ───────────────────────────────────── */
|
||||
|
||||
.propose {
|
||||
flex-shrink: 0;
|
||||
|
||||
Reference in New Issue
Block a user