mirror of https://github.com/VueTubeApp/VueTube
begin work on fixing bug #8
This commit is contained in:
parent
a8b78ff14a
commit
e03fd240f0
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!canGoBack){
|
//--- Back Goes Back ---//
|
||||||
|
} else if (!canGoBack){
|
||||||
CapacitorApp.exitApp();
|
CapacitorApp.exitApp();
|
||||||
} else {
|
} else {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
|
@ -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" >
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue