mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: simplify theme structure and remove color-related code
This commit is contained in:
parent
0a37ce4cda
commit
ec638d1a7a
5 changed files with 9 additions and 80 deletions
|
|
@ -1,24 +1,6 @@
|
|||
import { z } from "zod";
|
||||
|
||||
const isValidHexColor = (color: string): boolean => {
|
||||
const hexColorRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
|
||||
return hexColorRegex.test(color);
|
||||
};
|
||||
|
||||
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: string | undefined;
|
||||
authorName: string | undefined;
|
||||
isActive: boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue