feat: sidebar badge on new game download option

This commit is contained in:
Moyasee
2025-10-30 23:21:31 +02:00
parent 1bd88e6c6e
commit 101bc35460
16 changed files with 269 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import { levelKeys } from "./keys";
import { db } from "../level";
export const getLastDownloadSourcesCheck = async (): Promise<string | null> => {
try {
const timestamp = await db.get(levelKeys.lastDownloadSourcesCheck);
return timestamp;
} catch (error) {
// Key doesn't exist yet
return null;
}
};
export const updateLastDownloadSourcesCheck = async (timestamp: string): Promise<void> => {
await db.put(levelKeys.lastDownloadSourcesCheck, timestamp);
};

View File

@@ -7,3 +7,4 @@ export * from "./game-achievements";
export * from "./keys";
export * from "./themes";
export * from "./download-sources";
export * from "./downloadSourcesCheckTimestamp";

View File

@@ -18,4 +18,5 @@ export const levelKeys = {
screenState: "screenState",
rpcPassword: "rpcPassword",
downloadSources: "downloadSources",
lastDownloadSourcesCheck: "lastDownloadSourcesCheck",
};