Bootstrap v4 dark mode for modals and settings window (#1650)

* Bootstrap v4 dark mode for modals and settings window

* Fix package-lock.json

* Fix package-lock.json again

* Merge'd

* Oops

* Refactor into helper
This commit is contained in:
Devin Binnie
2021-07-09 17:19:49 -04:00
committed by GitHub
parent 880af87ddf
commit ee1b393e3d
16 changed files with 198 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ import log from 'electron-log';
import {CombinedConfig} from 'types/config';
import {MAXIMIZE_CHANGE, HISTORY, GET_LOADING_SCREEN_DATA, REACT_APP_INITIALIZED, LOADING_SCREEN_ANIMATION_FINISHED, FOCUS_THREE_DOT_MENU} from 'common/communication';
import {MAXIMIZE_CHANGE, HISTORY, GET_LOADING_SCREEN_DATA, REACT_APP_INITIALIZED, LOADING_SCREEN_ANIMATION_FINISHED, FOCUS_THREE_DOT_MENU, GET_DARK_MODE} from 'common/communication';
import urlUtils from 'common/utils/url';
import {getAdjustedWindowBoundaries} from '../utils';
@@ -35,6 +35,7 @@ const assetsDir = path.resolve(app.getAppPath(), 'assets');
ipcMain.on(HISTORY, handleHistory);
ipcMain.handle(GET_LOADING_SCREEN_DATA, handleLoadingScreenDataRequest);
ipcMain.handle(GET_DARK_MODE, handleGetDarkMode);
ipcMain.on(REACT_APP_INITIALIZED, handleReactAppInitialized);
ipcMain.on(LOADING_SCREEN_ANIMATION_FINISHED, handleLoadingScreenAnimationFinished);
@@ -441,3 +442,7 @@ export function handleHistory(event: IpcMainEvent, offset: number) {
}
}
}
function handleGetDarkMode() {
return status.config?.darkMode;
}