mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
save selectedColor for non-destructive theme viewing
This commit is contained in:
@@ -20,8 +20,14 @@ export const setTheme = async (themeId: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
const originalSelectedColor = await browser.storage.local.get('selectedColor') as { selectedColor: string; };
|
||||
await applyTheme(theme);
|
||||
await browser.storage.local.set({ selectedTheme: themeId });
|
||||
|
||||
await browser.storage.local.set({
|
||||
selectedTheme: themeId,
|
||||
selectedColor: theme.defaultColour,
|
||||
originalSelectedColor: originalSelectedColor.selectedColor
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error setting theme:', error);
|
||||
|
||||
Reference in New Issue
Block a user