begin work on fixing bug #8

This commit is contained in:
Front 2022-03-13 15:45:48 -04:00
parent a8b78ff14a
commit e03fd240f0
3 changed files with 30 additions and 7 deletions

View File

@ -106,16 +106,24 @@ export default {
text: null, text: null,
response: [], response: [],
}), }),
mounted() { 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}) => { CapacitorApp.addListener('backButton', ({canGoBack}) => {
//--- Back Closes Search ---// //--- Back Closes Search ---//
if (this.search) { if (this.search) {
this.search = false; this.search = false;
return;
} //--- Back Goes Back ---//
} else if (!canGoBack){
if(!canGoBack){
CapacitorApp.exitApp(); CapacitorApp.exitApp();
} else { } else {
window.history.back(); window.history.back();

View File

@ -1,4 +1,11 @@
import colors from 'vuetify/es5/util/colors' 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 { export default {
@ -43,8 +50,11 @@ export default {
buildModules: [ buildModules: [
'@nuxtjs/vuetify', '@nuxtjs/vuetify',
], ],
modules: [
'@nuxtjs/axios',
'@nuxtjs/auth-next'
],
modules: [],
vuetify: { vuetify: {
customVariables: ['~/assets/variables.scss'], customVariables: ['~/assets/variables.scss'],
theme: { theme: {

View File

@ -11,6 +11,7 @@
hint="Bravo Six, Going Dark." hint="Bravo Six, Going Dark."
persistent-hint persistent-hint
inset inset
@click="saveTheme($vuetify.theme.dark)"
/> />
</section> </section>
<v-btn v-if="$vuetify.theme.dark" text tile class="white--text black" @click="amoled" > <v-btn v-if="$vuetify.theme.dark" text tile class="white--text black" @click="amoled" >
@ -39,7 +40,7 @@
<script> <script>
export default { export default {
methods: { methods: {
amoled () { amoled() {
this.$vuetify.theme.themes.dark.background === '#000' ? ( this.$vuetify.theme.themes.dark.background === '#000' ? (
this.$vuetify.theme.themes.dark.accent = '#222', this.$vuetify.theme.themes.dark.accent = '#222',
this.$vuetify.theme.themes.dark.accent2 = '#222', this.$vuetify.theme.themes.dark.accent2 = '#222',
@ -53,6 +54,10 @@ export default {
// console.log(document.getElementsByClassName('v-application--wrap')[0]) // console.log(document.getElementsByClassName('v-application--wrap')[0])
// console.log(document.getElementsByClassName('v-application--wrap')[0].style) // console.log(document.getElementsByClassName('v-application--wrap')[0].style)
// document.getElementsByClassName('v-application--wrap')[0].style.backgroundColor = "#000000 !important" // document.getElementsByClassName('v-application--wrap')[0].style.backgroundColor = "#000000 !important"
},
saveTheme(isDark) {
this.$auth.$storage.setLocalStorage("darkTheme", isDark)
} }
} }
} }