Add theme customization and winner management features

Introduced a theme selection feature, allowing users to customize the application's appearance, with themes stored per user. Added functionality to manage and store the game's winner locally. These changes improve user experience and personalization.
This commit is contained in:
nessi committed 2026-02-06 09:15:51 +01:00
1 parent 1db91c6c88
commit a08b74ff7a
8 files changed
+297 -58

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
function winnerKey(gameId) {
return `winner:${gameId}`;
}
export function getWinner(gameId) {
if (!gameId) return "";
try {
return localStorage.getItem(winnerKey(gameId)) || "";
} catch {
return "";
}
}
export function setWinner(gameId, name) {
if (!gameId) return;
try {
localStorage.setItem(winnerKey(gameId), name || "");
} catch {}
}