From 1bd721d52393c038c6b33938fd8d60ea6deb3e2d Mon Sep 17 00:00:00 2001 From: Emma Alexia Date: Mon, 11 Dec 2023 22:51:29 -0500 Subject: [PATCH] Enable light mode and OLED mode as options (#936) Will eventually need the new component from knossos to be ported, but this will suffice for now --- theseus_gui/src/store/theme.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/theseus_gui/src/store/theme.js b/theseus_gui/src/store/theme.js index 6c0edd8c8..3337e4fdf 100644 --- a/theseus_gui/src/store/theme.js +++ b/theseus_gui/src/store/theme.js @@ -2,10 +2,9 @@ import { defineStore } from 'pinia' export const useTheming = defineStore('themeStore', { state: () => ({ - themeOptions: ['dark'], + themeOptions: ['dark', 'light', 'oled'], advancedRendering: true, selectedTheme: 'dark', - darkTheme: true, }), actions: { setThemeState(newTheme) { @@ -15,8 +14,9 @@ export const useTheming = defineStore('themeStore', { this.setThemeClass() }, setThemeClass() { - document.getElementsByTagName('html')[0].classList.remove('dark-mode') - document.getElementsByTagName('html')[0].classList.remove('light-mode') + for (const theme of this.themeOptions) { + document.getElementsByTagName('html')[0].classList.remove(`${theme}-mode`) + } document.getElementsByTagName('html')[0].classList.add(`${this.selectedTheme}-mode`) }, },