only single selected theme or custom background at once

This commit is contained in:
SethBurkart123
2023-11-02 19:05:37 +11:00
parent 7b0fc29461
commit e332977e08
7 changed files with 55 additions and 22 deletions
+3 -3
View File
@@ -1,5 +1,6 @@
interface ThemeList {
themes: string[];
selectedTheme: string;
}
export const downloadTheme = async (themeName: string, themeURL: string) => {
@@ -34,14 +35,13 @@ export const listThemes = async () => {
// send message to the background script
const response: ThemeList = await chrome.runtime.sendMessage({
type: 'currentTab',
info: 'ListThemes',
body: {}
info: 'ListThemes'
});
// response.themes is an array of strings that are identical to the theme names that we loop over. Use this list to see which ones are downloaded and which ones need to see the download icon.
console.log("Response: ", response);
return response.themes;
return response;
}
export const disableTheme = async () => {