diff --git a/quasar.conf.js b/quasar.conf.js index 8d98ffc..eabf426 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -96,6 +96,7 @@ module.exports = function (ctx) { plugins: [ "Notify", "Loading", + "LocalStorage", "Dialog" ] // iconSet: ctx.theme.mat ? "material-icons" : "ionicons" diff --git a/src/gateway/gateway.js b/src/gateway/gateway.js index 8fa4696..36de8d3 100644 --- a/src/gateway/gateway.js +++ b/src/gateway/gateway.js @@ -1,5 +1,5 @@ import { ipcRenderer } from "electron" -import { Notify, Dialog, Loading } from "quasar" +import { Notify, Dialog, Loading, LocalStorage } from "quasar" import { SCEE } from "./SCEE-Node"; import * as WebSocket from "ws" @@ -12,13 +12,17 @@ export class Gateway { this.token = null this.scee = new SCEE() + let theme = LocalStorage.has("theme") ? LocalStorage.get.item("theme") : "light" this.app.store.commit("gateway/set_app_data", { config: { appearance: { - theme: "dark" + theme } } }); + this.app.store.watch( state => state.gateway.app.config.appearance.theme, (theme) => { + LocalStorage.set("theme", theme) + }) this.closeDialog = false