feat(settings): add custom theme selector

This commit is contained in:
sethburkart123
2024-09-08 21:51:14 +10:00
parent 272deb2b8c
commit fdeea2f626
16 changed files with 224 additions and 40 deletions
+42
View File
@@ -0,0 +1,42 @@
export type CustomTheme = {
id: string;
name: string;
description: string;
defaultColour: string;
CanChangeColour: boolean;
allowBackgrounds: boolean;
CustomCSS: string;
CustomImages: CustomImage[];
coverImage: Blob | null;
isEditable: boolean;
hideThemeName: boolean;
webURL?: string;
selectedColor?: string;
forceDark?: boolean;
}
export type DownloadedTheme = CustomTheme & {
webURL: string;
}
export type CustomImage = {
id: string;
blob: Blob;
variableName: string;
}
export type CustomImageBase64 = {
id: string;
url: string;
variableName: string;
}
export type CustomThemeBase64 = Omit<CustomTheme, 'CustomImages'> & {
CustomImages: CustomImageBase64[];
coverImage: string | null;
}
export type ThemeList = {
themes: CustomTheme[];
selectedTheme: string;
}