2022-03-02 13:14:52 +00:00
|
|
|
<template>
|
2022-12-27 01:16:06 +00:00
|
|
|
<div
|
|
|
|
v-if="!$route.path.includes('/mods') || $route.path.includes('/tweaks')"
|
|
|
|
class="bottomNav background"
|
|
|
|
>
|
2022-05-13 22:25:47 +00:00
|
|
|
<v-divider v-if="!$store.state.tweaks.roundTweak" />
|
2022-05-13 06:20:15 +00:00
|
|
|
<v-bottom-navigation
|
|
|
|
v-model="tabSelection"
|
2022-12-27 20:24:42 +00:00
|
|
|
style="
|
|
|
|
box-shadow: none !important;
|
|
|
|
padding: 0 !important;
|
|
|
|
position: relative;
|
|
|
|
"
|
|
|
|
class="transparent nav"
|
2022-12-27 01:16:06 +00:00
|
|
|
:shift="$store.state.tweaks.navigationShift"
|
2022-03-21 20:34:34 +00:00
|
|
|
>
|
2022-05-13 06:20:15 +00:00
|
|
|
<v-btn
|
|
|
|
v-for="(item, i) in tabs"
|
|
|
|
:key="i"
|
|
|
|
v-ripple="false"
|
2022-12-27 20:24:42 +00:00
|
|
|
active-class="link-active"
|
|
|
|
class="navButton link"
|
2022-05-13 06:20:15 +00:00
|
|
|
:to="item.link"
|
|
|
|
plain
|
|
|
|
>
|
2022-12-27 01:16:06 +00:00
|
|
|
<span v-if="$store.state.tweaks.navigationText" v-text="item.name" />
|
2022-12-27 04:32:48 +00:00
|
|
|
<div
|
|
|
|
v-if="$store.state.tweaks.navigationIcons !== 0"
|
|
|
|
class="px-3"
|
|
|
|
:style="{
|
|
|
|
color:
|
|
|
|
tabSelection == i
|
|
|
|
? 'var(--v-primary-base)'
|
|
|
|
: $vuetify.theme.dark
|
|
|
|
? 'var(--v-background-lighten4)'
|
|
|
|
: 'var(--v-background-darken4)',
|
|
|
|
}"
|
|
|
|
:class="
|
2022-12-27 20:24:42 +00:00
|
|
|
tabSelection == i && $store.state.tweaks.navigationShift
|
2022-12-27 04:32:48 +00:00
|
|
|
? $vuetify.theme.dark
|
|
|
|
? 'tab primary darken-4'
|
|
|
|
: 'tab primary lighten-4'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<svg
|
|
|
|
v-if="$store.state.tweaks.navigationIcons === 1"
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
fill="currentColor"
|
2022-12-27 04:54:36 +00:00
|
|
|
viewBox="0 0 50 50"
|
2022-12-27 04:32:48 +00:00
|
|
|
height="1.5rem"
|
|
|
|
width="1.5rem"
|
2022-12-27 04:54:36 +00:00
|
|
|
class="mt-1"
|
2022-12-27 04:32:48 +00:00
|
|
|
>
|
|
|
|
<use :href="`/${item.svg}.svg#main`" />
|
|
|
|
</svg>
|
|
|
|
<svg
|
|
|
|
v-if="$store.state.tweaks.navigationIcons === 2"
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
fill="currentColor"
|
2022-12-27 20:24:42 +00:00
|
|
|
viewBox="0 0 21 21"
|
2022-12-27 04:32:48 +00:00
|
|
|
height="1.5rem"
|
|
|
|
width="1.5rem"
|
2022-12-27 04:54:36 +00:00
|
|
|
class="mt-1"
|
2022-12-27 04:32:48 +00:00
|
|
|
>
|
|
|
|
<use :href="`/${item.svg2}.svg#main`" />
|
|
|
|
</svg>
|
|
|
|
<svg
|
|
|
|
v-if="$store.state.tweaks.navigationIcons === 3"
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
fill="currentColor"
|
2022-12-27 20:24:42 +00:00
|
|
|
viewBox="0 0 33 33"
|
2022-12-27 04:32:48 +00:00
|
|
|
height="1.5rem"
|
|
|
|
width="1.5rem"
|
2022-12-27 04:54:36 +00:00
|
|
|
class="mt-1"
|
2022-12-27 04:32:48 +00:00
|
|
|
>
|
|
|
|
<use :href="`/${item.svg3}.svg#main`" />
|
|
|
|
</svg>
|
|
|
|
</div>
|
2022-05-13 06:20:15 +00:00
|
|
|
<v-icon
|
2022-12-27 04:32:48 +00:00
|
|
|
v-if="$store.state.tweaks.navigationIcons === 0"
|
2022-12-27 20:24:42 +00:00
|
|
|
class="my-1"
|
2022-05-13 06:20:15 +00:00
|
|
|
:color="
|
|
|
|
tabSelection == i
|
|
|
|
? 'primary'
|
|
|
|
: $vuetify.theme.dark
|
|
|
|
? 'background lighten-4'
|
|
|
|
: 'background darken-4'
|
|
|
|
"
|
|
|
|
:class="
|
2022-12-27 20:24:42 +00:00
|
|
|
tabSelection == i && $store.state.tweaks.navigationShift
|
2022-05-13 06:20:15 +00:00
|
|
|
? $vuetify.theme.dark
|
|
|
|
? 'tab primary darken-4'
|
|
|
|
: 'tab primary lighten-4'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
v-text="item.icon"
|
|
|
|
/>
|
2022-12-27 01:16:06 +00:00
|
|
|
<!-- + (tabSelection == i ? '' : '-outline') -->
|
2022-05-13 06:20:15 +00:00
|
|
|
</v-btn>
|
2022-12-27 20:24:42 +00:00
|
|
|
<div
|
|
|
|
v-if="!$store.state.tweaks.navigationShift"
|
|
|
|
:style="{
|
|
|
|
top: $store.state.tweaks.navigationText ? '0.35rem' : '0.75rem',
|
|
|
|
}"
|
|
|
|
class="link-anime"
|
|
|
|
></div>
|
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
|
|
|
|
> -->
|
2022-05-13 06:20:15 +00:00
|
|
|
</v-bottom-navigation>
|
|
|
|
</div>
|
2022-03-02 13:14:52 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
tabSelection: 0,
|
|
|
|
tabs: [
|
2022-03-21 20:34:34 +00:00
|
|
|
// TODO: pull from Vuex & localStorage for customizations
|
2022-12-27 01:16:06 +00:00
|
|
|
{
|
|
|
|
name: "",
|
|
|
|
icon: "mdi-home",
|
2022-12-27 04:32:48 +00:00
|
|
|
svg: "home",
|
|
|
|
svg2: "fhome",
|
|
|
|
svg3: "chome",
|
2022-12-27 01:16:06 +00:00
|
|
|
link: "/home",
|
|
|
|
},
|
|
|
|
// { name: "Shorts", icon: "mdi-lightning-bolt", link: "/shorts" },
|
|
|
|
// { name: "Upload", icon: "mdi-plus", link: "/upload" },
|
2022-03-21 20:34:34 +00:00
|
|
|
{
|
2022-06-15 01:45:42 +00:00
|
|
|
name: "",
|
2022-03-21 20:34:34 +00:00
|
|
|
icon: "mdi-youtube-subscription",
|
2022-12-27 04:32:48 +00:00
|
|
|
svg: "subs",
|
|
|
|
svg2: "fsubs",
|
|
|
|
svg3: "csubs",
|
2022-03-21 20:34:34 +00:00
|
|
|
link: "/subscriptions",
|
|
|
|
},
|
2022-12-27 01:16:06 +00:00
|
|
|
{
|
|
|
|
name: "",
|
|
|
|
icon: "mdi-view-list",
|
2022-12-27 04:32:48 +00:00
|
|
|
svg: "list",
|
|
|
|
svg2: "flist",
|
|
|
|
svg3: "clist",
|
2022-12-27 01:16:06 +00:00
|
|
|
link: "/library",
|
|
|
|
},
|
2022-03-21 20:34:34 +00:00
|
|
|
// { name: "Settings", icon: "mdi-menu", link: "/settings" },
|
2022-03-02 13:14:52 +00:00
|
|
|
],
|
2022-03-21 20:34:34 +00:00
|
|
|
};
|
|
|
|
},
|
2022-05-06 03:11:28 +00:00
|
|
|
|
|
|
|
mounted() {
|
2022-06-15 01:45:42 +00:00
|
|
|
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-21 20:34:34 +00:00
|
|
|
};
|
2022-03-02 13:14:52 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
2022-12-27 20:24:42 +00:00
|
|
|
.link-anime {
|
|
|
|
right: 0;
|
|
|
|
height: 2rem;
|
|
|
|
width: 3.25rem;
|
|
|
|
position: absolute;
|
|
|
|
transition: transform 0.15s ease-in-out, scale 0.1s ease;
|
|
|
|
background-color: var(--v-primary-base);
|
|
|
|
padding: 0.1em 0.5em 0.1em 0.5em;
|
|
|
|
border-radius: 2rem;
|
|
|
|
opacity: 0.25;
|
|
|
|
z-index: -1;
|
|
|
|
scale: 0;
|
|
|
|
}
|
|
|
|
/* TODO: calculate inside <template></template> based on tabs.length */
|
|
|
|
.nav .link:first-child.link-active ~ .link-anime {
|
|
|
|
transform: translateX(calc(-75vw + 50%));
|
|
|
|
scale: 1;
|
|
|
|
}
|
|
|
|
.nav .link:nth-child(2).link-active ~ .link-anime {
|
|
|
|
transform: translateX(calc(-50vw + 50%));
|
|
|
|
scale: 1;
|
|
|
|
}
|
|
|
|
.nav .link:nth-child(3).link-active ~ .link-anime {
|
|
|
|
transform: translateX(calc(-25vw + 50%));
|
|
|
|
scale: 1;
|
|
|
|
}
|
2022-03-02 13:14:52 +00:00
|
|
|
.bottomNav {
|
2022-05-13 06:20:15 +00:00
|
|
|
/* 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;
|
2022-03-31 23:58:37 +00:00
|
|
|
position: fixed;
|
2022-12-27 20:24:42 +00:00
|
|
|
z-index: 100;
|
2022-05-13 06:20:15 +00:00
|
|
|
width: 100%;
|
|
|
|
bottom: 0;
|
2022-03-02 13:14:52 +00:00
|
|
|
}
|
|
|
|
.navButton {
|
2022-03-22 01:13:48 +00:00
|
|
|
width: 25vw !important;
|
2022-03-21 20:34:34 +00:00
|
|
|
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;
|
2022-12-27 04:32:48 +00:00
|
|
|
border-radius: 2rem;
|
2022-03-07 13:52:38 +00:00
|
|
|
}
|
2022-03-02 13:14:52 +00:00
|
|
|
</style>
|