mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 17:53:55 +00:00
feat: implement custom theme management
This commit is contained in:
@@ -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
23
src/types/theme.types.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user