mirror of
https://github.com/Dasemu/si-no-o-indiferente.git
synced 2026-11-26 23:36:25 +00:00
Add Historias Incompletas: web+APK story game with Gemini-powered daily deck
Node/Express backend generates 5 lateral-thinking mystery stories a day via Gemini and serves the latest batch; React/Vite frontend (Capacitor-wrapped for Android) plays them pass-and-play style, falling back to a bundled set of 16 original stories when the backend has nothing new or is unreachable. Includes systemd/nginx deploy config for a Docker-less Debian LXC. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
de0dfec6af
commit
7f3e6cc839
97 files changed
+6803
-1
No files matched your search
@@ -0,0 +1,28 @@
|
||||
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 {
|
||||
// ignorar si localStorage no esta disponible
|
||||
}
|
||||
}
|
||||
|
||||
export function resetUsedStories(): void {
|
||||
try {
|
||||
localStorage.removeItem(USED_KEY);
|
||||
} catch {
|
||||
// ignorar
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user