make downloading themes possible from background script

This commit is contained in:
SethBurkart123
2024-04-11 08:42:33 +10:00
parent 8c06ea1ec1
commit 4a29885e62
5 changed files with 48 additions and 3 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ const Theme = () => {
<p className="mb-8">{theme.description}</p>
<button
className="flex justify-center w-full gap-1 px-3 py-2 text-white transition cursor-pointer rounded-2xl ring-white/20 hover:ring-white/10 ring-1 bg-zinc-950/20 hover:bg-zinc-950/40"
onClick={() => browser.runtime.sendMessage({ type: 'currentTab', info: 'DownloadTheme', body: { themeID: themeID } }) }
onClick={() => browser.runtime.sendMessage({ type: 'DownloadTheme', body: { theme } }) }
>
Install Theme
</button>
+1 -1
View File
@@ -99,7 +99,7 @@ function ThemeCreator() {
}, []);
const generateImageId = () => {
return '_' + Math.random().toString(36).substr(2, 9);
return Math.random().toString(36).substr(2, 9);
};
const handleImageUpload = (event: React.ChangeEvent<HTMLInputElement>) => {