mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: lock dark mode toggle with theme settings
This commit is contained in:
@@ -3,14 +3,15 @@ import { settingsState } from '../../utils/listeners/SettingsState';
|
||||
import { applyCustomCSS } from './Themes';
|
||||
|
||||
|
||||
export const applyTheme = async (theme: CustomTheme) => {
|
||||
export const applyTheme = async (theme: CustomTheme, reEnable?: boolean) => {
|
||||
let CustomCSS = '';
|
||||
let CustomImages: CustomImage[] = [];
|
||||
|
||||
if (theme?.CustomCSS) CustomCSS = theme.CustomCSS;
|
||||
if (theme?.CustomImages) CustomImages = theme.CustomImages;
|
||||
if (theme?.forceDark) {
|
||||
settingsState.originalDarkMode = settingsState.DarkMode
|
||||
if (theme?.forceDark != undefined) {
|
||||
if (!reEnable) settingsState.originalDarkMode = settingsState.DarkMode
|
||||
|
||||
settingsState.DarkMode = theme.forceDark
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user