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

@@ -294,3 +294,4 @@ export * from "./download.types";
export * from "./ludusavi.types";
export * from "./how-long-to-beat.types";
export * from "./level.types";
export * from "./theme.types";

23
src/types/theme.types.ts Normal file
View File

@@ -0,0 +1,23 @@
import { isValidHexColor } from "@main/helpers";
import { z } from "zod";
const hexColorSchema = z.string().refine(isValidHexColor);
type HexColorType = z.infer<typeof hexColorSchema>;
export interface Theme {
id: string;
name: string;
colors: {
accent: HexColorType;
background: HexColorType;
surface: HexColorType;
optional1?: HexColorType;
optional2?: HexColorType;
};
description?: string;
author: number;
isActive: boolean;
code: string;
createdAt: Date;
updatedAt: Date;
}