0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-01 09:22:39 +00:00
VueTube/NUXT/components/bottomNavigation.vue

120 lines
3 KiB
Vue
Raw Normal View History

2022-03-02 13:14:52 +00:00
<template>
<div class="bottomNav background">
<v-divider v-if="!$store.state.tweaks.roundTweak" />
<v-bottom-navigation
v-model="tabSelection"
style="padding: 0 !important; box-shadow: none !important"
class="transparent"
shift
>
<v-btn
v-for="(item, i) in tabs"
:key="i"
v-ripple="false"
class="navButton"
:to="item.link"
plain
>
<span v-text="item.name" />
<v-icon
:color="
tabSelection == i
? 'primary'
: $vuetify.theme.dark
? 'background lighten-4'
: 'background darken-4'
"
:class="
tabSelection == i
? $vuetify.theme.dark
? 'tab primary darken-4'
: 'tab primary lighten-4'
: ''
"
v-text="item.icon"
/>
<!--
2022-03-02 13:14:52 +00:00
<span v-text="item.name" />
<v-icon
2022-03-30 02:37:54 +00:00
:color="
tabSelection == i
? 'primary'
: $vuetify.theme.dark
? 'background lighten-4'
: 'background darken-4'
"
:class="
tabSelection == i
? $vuetify.theme.dark
? 'tab primary darken-4'
: 'tab primary lighten-4'
: ''
"
2022-03-21 23:47:11 +00:00
v-text="item.icon"
2022-05-13 06:21:54 +00:00
/> -->
<!-- Add the following to 'v-text- above to make the icons outlined unless active
2022-03-24 19:56:11 +00:00
+ (tabSelection == i ? '' : '-outline')
-->
</v-btn>
2022-05-13 06:21:54 +00:00
<!-- <v-btn
text
class="navButton mr-2 fill-height"
color="white"
@click="searchBtn()"
><v-icon>mdi-magnify</v-icon></v-btn
> -->
</v-bottom-navigation>
</div>
2022-03-02 13:14:52 +00:00
</template>
<script>
export default {
data() {
return {
tabSelection: 0,
tabs: [
// TODO: pull from Vuex & localStorage for customizations
{ name: "", icon: "mdi-home", link: "/home" },
2022-03-02 13:14:52 +00:00
//{ name: "Shorts", icon: "mdi-lightning-bolt", link: "/shorts" },
//{ name: "Upload", icon: "mdi-plus", link: "/upload" },
{
name: "",
icon: "mdi-youtube-subscription",
link: "/subscriptions",
},
{ name: "", icon: "mdi-view-list", link: "/library" },
// { name: "Settings", icon: "mdi-menu", link: "/settings" },
2022-03-02 13:14:52 +00:00
],
};
},
mounted() {
const lang = this.$lang("global");
this.tabs[0].name = lang.home;
this.tabs[1].name = lang.subscriptions;
this.tabs[2].name = lang.library;
2022-05-13 06:21:54 +00:00
},
};
2022-03-02 13:14:52 +00:00
</script>
<style scoped>
.bottomNav {
/* box-shadow: inset 0 0 10rem var(--v-background-base) !important; */
height: calc(4rem + env(safe-area-inset-bottom)) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
2022-05-05 04:28:51 +00:00
box-shadow: none !important;
position: fixed;
width: 100%;
bottom: 0;
z-index: 100;
2022-03-02 13:14:52 +00:00
}
.navButton {
2022-03-22 01:13:48 +00:00
width: 25vw !important;
font-size: 0.66rem !important;
2022-03-02 13:14:52 +00:00
}
2022-03-07 13:52:38 +00:00
.tab {
padding: 0.1em 0.5em 0.1em 0.5em;
border-radius: 1em;
}
2022-03-02 13:14:52 +00:00
</style>