mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-22 11:15:14 +00:00
amoled theme
This commit is contained in:
parent
c6581ac069
commit
42287c41df
3 changed files with 57 additions and 30 deletions
|
@ -1,16 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app class="background">
|
||||||
|
<v-card class="topNav rounded-0" style="display: flex;" color="accent white--text">
|
||||||
<v-card class="topNav rounded-0" style="display: flex;" color="accent">
|
|
||||||
<h2 v-text="page" />
|
<h2 v-text="page" />
|
||||||
<v-spacer />
|
<v-spacer />
|
||||||
<v-btn text class="toolbarAction"><v-icon>mdi-magnify</v-icon></v-btn>
|
<v-btn text class="toolbarAction" color="white"><v-icon>mdi-magnify</v-icon></v-btn>
|
||||||
|
|
||||||
|
<v-menu offset-y content-class="mt-4">
|
||||||
|
|
||||||
<v-menu offset-y>
|
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<v-btn text class="toolbarAction" v-bind="attrs" v-on="on"><v-icon>mdi-dots-vertical</v-icon></v-btn>
|
<v-btn text class="toolbarAction" v-bind="attrs" v-on="on" color="white" style="padding-right: 0 !important;"><v-icon>mdi-dots-vertical</v-icon></v-btn>
|
||||||
</template>
|
</template>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item v-for="(item, index) in dropdownMenu" :key="index">
|
<v-list-item v-for="(item, index) in dropdownMenu" :key="index">
|
||||||
|
@ -18,16 +15,13 @@
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
<div class="background" style="min-height: 100%">
|
||||||
<div>
|
|
||||||
<nuxt />
|
<nuxt />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-bottom-navigation v-model="tabSelection" class="bottomNav rounded-0">
|
<v-bottom-navigation v-model="tabSelection" shift class="bottomNav background rounded-0">
|
||||||
<v-btn v-for="(item, i) in tabs" :key="i" class="navButton" :to="item.link">
|
<v-btn v-for="(item, i) in tabs" :key="i" class="navButton" :to="item.link">
|
||||||
|
|
||||||
<span v-text="item.name" />
|
<span v-text="item.name" />
|
||||||
|
|
|
@ -44,11 +44,13 @@ export default {
|
||||||
dark: false,
|
dark: false,
|
||||||
themes: {
|
themes: {
|
||||||
light: {
|
light: {
|
||||||
|
background: colors.white,
|
||||||
primary: colors.red.lighten1,
|
primary: colors.red.lighten1,
|
||||||
accent: "#E62117",
|
accent: "#E62117",
|
||||||
info: "#000"
|
info: "#000"
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
|
background: colors.grey.darken9,
|
||||||
primary: colors.red.darken2, //colors.blue.darken2
|
primary: colors.red.darken2, //colors.blue.darken2
|
||||||
accent: colors.grey.darken3,
|
accent: colors.grey.darken3,
|
||||||
secondary: colors.amber.darken3,
|
secondary: colors.amber.darken3,
|
||||||
|
|
|
@ -2,16 +2,27 @@
|
||||||
<div class="mainContainer">
|
<div class="mainContainer">
|
||||||
|
|
||||||
|
|
||||||
<v-card>
|
<v-card class="pb-5">
|
||||||
<v-card-title>Theme</v-card-title>
|
<v-card-title>Theme</v-card-title>
|
||||||
<section>
|
<v-row class="ml-3 mr-6">
|
||||||
|
<section class="row">
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="$vuetify.theme.dark"
|
v-model="$vuetify.theme.dark"
|
||||||
label="Dark Theme"
|
label="Dark Theme"
|
||||||
hint="Bravo Six, Going Dark."
|
hint="Bravo Six, Going Dark."
|
||||||
persistent-hint
|
persistent-hint
|
||||||
|
inset
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
|
<v-btn v-if="$vuetify.theme.dark" text tile class="white--text black" @click="amoled" >
|
||||||
|
{{
|
||||||
|
this.$vuetify.theme.themes.dark.background === '#000000'
|
||||||
|
? 'LCD'
|
||||||
|
: 'OLED'
|
||||||
|
}}
|
||||||
|
<v-icon :size="this.$vuetify.theme.themes.dark.background === '#000000' ? '.5rem' : '.9rem'" class="ml-2">mdi-brightness-2</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<v-card>
|
<v-card>
|
||||||
|
@ -26,6 +37,26 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
amoled () {
|
||||||
|
this.$vuetify.theme.themes.dark.background === '#000000' ? (
|
||||||
|
this.$vuetify.theme.themes.dark.accent = '#444444',
|
||||||
|
this.$vuetify.theme.themes.dark.background = '#111111'
|
||||||
|
) : (
|
||||||
|
this.$vuetify.theme.themes.dark.accent = '#000000',
|
||||||
|
this.$vuetify.theme.themes.dark.background = '#000000'
|
||||||
|
)
|
||||||
|
// doesn't work 😭
|
||||||
|
// console.log(document.getElementsByClassName('v-application--wrap')[0])
|
||||||
|
// console.log(document.getElementsByClassName('v-application--wrap')[0].style)
|
||||||
|
// document.getElementsByClassName('v-application--wrap')[0].style.backgroundColor = "#000000 !important"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.v-card {
|
.v-card {
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
|
|
Loading…
Reference in a new issue