mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Check for standalone before using the system theme
This commit is contained in:
parent
fe35220145
commit
d8a8bf7a58
@ -6,10 +6,16 @@ export const THEMES = {
|
||||
export let THEME = THEMES.light;
|
||||
let currentThemePreference = "light";
|
||||
|
||||
THEMES.system = THEMES.light;
|
||||
ipcRenderer.on("system-theme-updated", detectSystemTheme);
|
||||
if (G_IS_STANDALONE) {
|
||||
THEMES.system = THEMES.light;
|
||||
ipcRenderer.on("system-theme-updated", detectSystemTheme);
|
||||
}
|
||||
|
||||
export function detectSystemTheme() {
|
||||
if (!G_IS_STANDALONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
return ipcRenderer
|
||||
.invoke("get-system-theme")
|
||||
.then(theme => (THEMES.system = THEMES[theme]))
|
||||
|
@ -291,7 +291,7 @@ class SettingsStorage {
|
||||
this.soundVolume = 1.0;
|
||||
this.musicVolume = 1.0;
|
||||
|
||||
this.theme = "system";
|
||||
this.theme = G_IS_STANDALONE ? "system" : "light";
|
||||
this.refreshRate = "60";
|
||||
this.scrollWheelSensitivity = "regular";
|
||||
this.movementSpeed = "regular";
|
||||
|
Loading…
Reference in New Issue
Block a user