0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-22 11:15:14 +00:00

amoled theme

This commit is contained in:
Nikita Krupin 2022-02-24 19:33:03 -05:00
parent c6581ac069
commit 42287c41df
3 changed files with 57 additions and 30 deletions

View file

@ -1,33 +1,27 @@
<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">
<template v-slot:activator="{ on, attrs }">
<v-menu offset-y> <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 v-slot:activator="{ on, attrs }"> </template>
<v-btn text class="toolbarAction" v-bind="attrs" v-on="on"><v-icon>mdi-dots-vertical</v-icon></v-btn> <v-list>
</template> <v-list-item v-for="(item, index) in dropdownMenu" :key="index">
<v-list> <nuxt-link :to="item.link" style="text-decoration: none;" class="info--text">{{ item.title }}</nuxt-link>
<v-list-item v-for="(item, index) in dropdownMenu" :key="index"> </v-list-item>
<nuxt-link :to="item.link" style="text-decoration: none;" class="info--text">{{ item.title }}</nuxt-link> </v-list>
</v-list-item> </v-menu>
</v-list>
</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" />

View file

@ -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,

View file

@ -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">
<v-switch <section class="row">
v-model="$vuetify.theme.dark" <v-switch
label="Dark Theme" v-model="$vuetify.theme.dark"
hint="Bravo Six, Going Dark." label="Dark Theme"
persistent-hint hint="Bravo Six, Going Dark."
/> persistent-hint
</section> inset
/>
</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;