mirror of
https://github.com/Dasemu/si-no-o-indiferente.git
synced 2026-11-26 07:16:19 +00:00
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.
29 lines
604 B
TypeScript
29 lines
604 B
TypeScript
const USED_KEY = "historias.usedStoryIds.v1";
|
|
|
|
export function getUsedStoryIds(): string[] {
|
|
try {
|
|
const raw = localStorage.getItem(USED_KEY);
|
|
return raw ? (JSON.parse(raw) as string[]) : [];
|
|
} catch {
|
|
return [];
|
|
}
|
|
}
|
|
|
|
export function markStoryUsed(id: string): void {
|
|
const used = new Set(getUsedStoryIds());
|
|
used.add(id);
|
|
try {
|
|
localStorage.setItem(USED_KEY, JSON.stringify([...used]));
|
|
} catch {
|
|
// Ignore if localStorage is unavailable.
|
|
}
|
|
}
|
|
|
|
export function resetUsedStories(): void {
|
|
try {
|
|
localStorage.removeItem(USED_KEY);
|
|
} catch {
|
|
// Ignore.
|
|
}
|
|
}
|