From e03fd240f05e2426408972c8096cecedaecd7bcb Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Sun, 13 Mar 2022 15:45:48 -0400 Subject: [PATCH] begin work on fixing bug #8 --- NUXT/layouts/default.vue | 18 +++++++++++++----- NUXT/nuxt.config.js | 12 +++++++++++- NUXT/pages/settings.vue | 7 ++++++- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/NUXT/layouts/default.vue b/NUXT/layouts/default.vue index 243fe67..c516e64 100644 --- a/NUXT/layouts/default.vue +++ b/NUXT/layouts/default.vue @@ -106,16 +106,24 @@ export default { text: null, response: [], }), + mounted() { + + //--- Load Saved Theme ---// + const theme = this.$auth.$storage.getLocalStorage("darkTheme"); + if (theme != undefined) { + this.$vuetify.theme.dark = theme; + } + + //--- Back Button Listener ---// CapacitorApp.addListener('backButton', ({canGoBack}) => { - //--- Back Closes Search ---// + //--- Back Closes Search ---// if (this.search) { this.search = false; - return; - } - - if(!canGoBack){ + + //--- Back Goes Back ---// + } else if (!canGoBack){ CapacitorApp.exitApp(); } else { window.history.back(); diff --git a/NUXT/nuxt.config.js b/NUXT/nuxt.config.js index e970be3..bf14997 100644 --- a/NUXT/nuxt.config.js +++ b/NUXT/nuxt.config.js @@ -1,4 +1,11 @@ import colors from 'vuetify/es5/util/colors' +/**** Front's Notes / Don't Remove **** +* Data Storage: +* this.$auth.$storage.setLocalStorage("Authentication", val) +* this.$auth.$storage.getLocalStorage("Authentication") +* this.$auth.$storage.removeLocalStorage("Authentication") +*/ + export default { @@ -43,8 +50,11 @@ export default { buildModules: [ '@nuxtjs/vuetify', ], + modules: [ + '@nuxtjs/axios', + '@nuxtjs/auth-next' + ], - modules: [], vuetify: { customVariables: ['~/assets/variables.scss'], theme: { diff --git a/NUXT/pages/settings.vue b/NUXT/pages/settings.vue index 8a28d44..277fb42 100644 --- a/NUXT/pages/settings.vue +++ b/NUXT/pages/settings.vue @@ -11,6 +11,7 @@ hint="Bravo Six, Going Dark." persistent-hint inset + @click="saveTheme($vuetify.theme.dark)" /> @@ -39,7 +40,7 @@