feat: implement custom theme management

This commit is contained in:
Hachi-R
2025-01-24 15:27:46 -03:00
parent 6bf049d136
commit 58f63cab44
12 changed files with 95 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ export const levelKeys = {
game: (shop: GameShop, objectId: string) => `${shop}:${objectId}`,
user: "user",
auth: "auth",
themes: "themes",
gameShopCache: "gameShopCache",
gameShopCacheItem: (shop: GameShop, objectId: string, language: string) =>
`${shop}:${objectId}:${language}`,

View File

@@ -0,0 +1,7 @@
import type { Theme } from "@types";
import { db } from "../level";
import { levelKeys } from "./keys";
export const themes = db.sublevel<string, Theme>(levelKeys.themes, {
valueEncoding: "json",
});