Rename game, redesign UI as a noir case-file, simplify narrator flow

Renames the game to "Sí, no, o indiferente" across the app, README,
Capacitor config and Android strings. Replaces the dark-purple theme
with a distinct case-file/dossier look (monospace type, black/cream/red
palette, stamped difficulty badges, stacked-card shadows). Removes the
progressive hint system and the two-step solution confirmation: the
narrator's solution is now always rendered, gated only by a blur
show/hide toggle with a "Confidencial" stamp. Adds a back button from
the narrator screen to the picker (without marking the story as used),
drops dev-facing cruft (story source/count badge), converts remaining
UI copy to Peninsular Spanish, and adds a post-game screen where players
can optionally rate a story's difficulty (1-5), sent to the new backend
ratings endpoint.
This commit is contained in:
dasemu committed 2026-08-24 04:53:25 +02:00
1 parent 99a903f6e1
commit 2681039074
15 files changed
+521 -304

No files matched your search

+18 -49
View File
@@ -4,66 +4,35 @@ import type { Story } from "../types";
interface NarratorViewProps {
story: Story;
onFinish: () => void;
onBack: () => void;
}
export default function NarratorView({ story, onFinish }: NarratorViewProps) {
const [revealedHints, setRevealedHints] = useState(0);
const [solutionArmed, setSolutionArmed] = useState(false);
const [solutionShown, setSolutionShown] = useState(false);
export default function NarratorView({ story, onFinish, onBack }: NarratorViewProps) {
const [solutionHidden, setSolutionHidden] = useState(true);
return (
<section className="screen narrator">
<div className="narrator-warning">Solo para quien narra — no muestres la pantalla al resto del grupo.</div>
<h2>{story.title}</h2>
<header className="narrator-header">
<button className="ghost" onClick={onBack}>
← Volver
</button>
<h2>{story.title}</h2>
</header>
<div className="teaser-card">
<h3>Enigma (leélo en voz alta)</h3>
<h3>Enigma</h3>
<p>{story.teaser}</p>
</div>
{revealedHints > 0 && (
<div className="hints-card">
<h3>Pistas reveladas</h3>
<ol>
{story.hints.slice(0, revealedHints).map((hint, i) => (
<li key={i}>{hint}</li>
))}
</ol>
<div className="solution-card">
<div className="solution-card-header">
<h3>Solución completa</h3>
<button className="icon-toggle" onClick={() => setSolutionHidden((v) => !v)}>
{solutionHidden ? "Mostrar" : "Ocultar"}
</button>
</div>
)}
{revealedHints < story.hints.length && (
<button className="ghost" onClick={() => setRevealedHints((n) => n + 1)}>
Revelar siguiente pista ({revealedHints}/{story.hints.length})
</button>
)}
<div className="solution-area">
{!solutionShown ? (
<>
{!solutionArmed ? (
<button className="danger" onClick={() => setSolutionArmed(true)}>
Mostrar solución
</button>
) : (
<div className="confirm-row">
<span>¿Seguro? Esto revela el final de la historia.</span>
<button className="danger" onClick={() => setSolutionShown(true)}>
Sí, mostrar
</button>
<button className="ghost" onClick={() => setSolutionArmed(false)}>
Cancelar
</button>
</div>
)}
</>
) : (
<div className="solution-card">
<h3>Solución completa</h3>
<p>{story.solution}</p>
</div>
)}
<p className={solutionHidden ? "solution-text is-hidden" : "solution-text"}>{story.solution}</p>
{solutionHidden && <span className="confidential-stamp">Confidencial</span>}
</div>
<button className="primary" onClick={onFinish}>