diff --git a/src/interface/pages/ThemeCreator.tsx b/src/interface/pages/ThemeCreator.tsx
index faa6652b..47e99007 100644
--- a/src/interface/pages/ThemeCreator.tsx
+++ b/src/interface/pages/ThemeCreator.tsx
@@ -19,6 +19,8 @@ function ThemeCreator() {
allowBackgrounds: true,
CustomCSS: '',
CustomImages: [],
+ coverImage: null,
+ isEditable: true
});
useEffect(() => {
@@ -154,7 +156,7 @@ function ThemeCreator() {
-
Description (optional)
+
Description (optional)
+
+
+ Cover Image (optional)
+ Upload an image to use as the cover image for your theme. Recommended resolution: 348x64
+
+
+
+
Add cover image
+
{
+ const file = e.target.files?.[0];
+ e.target.value = '';
+ if (file) {
+ const reader = new FileReader();
+ reader.onload = async () => {
+ const imageBlob = await fetch(reader.result as string).then(res => res.blob());
+ setTheme({ ...theme, coverImage: imageBlob });
+ };
+ reader.readAsDataURL(file);
+ }
+ }} className="absolute inset-0 w-full h-full opacity-0 cursor-pointer" />
+
+
Custom Theme Colour
diff --git a/src/interface/types/CustomThemes.ts b/src/interface/types/CustomThemes.ts
index 52ba0d69..b88c6771 100644
--- a/src/interface/types/CustomThemes.ts
+++ b/src/interface/types/CustomThemes.ts
@@ -7,6 +7,8 @@ export type CustomTheme = {
allowBackgrounds: boolean;
CustomCSS: string;
CustomImages: CustomImage[];
+ coverImage: Blob | null;
+ isEditable: boolean;
}
export type CustomImage = {
@@ -23,6 +25,7 @@ export type CustomImageBase64 = {
export type CustomThemeBase64 = Omit
& {
CustomImages: CustomImageBase64[];
+ coverImage: string | null;
}
export type ThemeList = {