mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Fixed navbar on mobile
This commit is contained in:
parent
02272e4385
commit
a56d4f6d11
1 changed files with 12 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<v-navigation-drawer width="175px" clipped app permanent expand-on-hover>
|
<v-navigation-drawer width="175px" clipped app :expand-on-hover="!mobile">
|
||||||
<v-list nav dense>
|
<v-list nav dense>
|
||||||
<v-list-item v-for="nav in links" :key="nav.title" link :to="nav.to">
|
<v-list-item v-for="nav in links" :key="nav.title" link :to="nav.to">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
|
@ -34,6 +34,16 @@ export default {
|
||||||
allCategories() {
|
allCategories() {
|
||||||
return this.$store.getters.getCategories;
|
return this.$store.getters.getCategories;
|
||||||
},
|
},
|
||||||
|
mobile() {
|
||||||
|
switch (this.$vuetify.breakpoint.name) {
|
||||||
|
case "xs":
|
||||||
|
return true;
|
||||||
|
case "sm":
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
allCategories() {
|
allCategories() {
|
||||||
|
@ -48,7 +58,7 @@ export default {
|
||||||
async buildSidebar() {
|
async buildSidebar() {
|
||||||
this.links = [];
|
this.links = [];
|
||||||
this.links.push(...this.baseLinks);
|
this.links.push(...this.baseLinks);
|
||||||
this.allCategories.forEach(async (element) => {
|
this.allCategories.forEach(async element => {
|
||||||
this.links.push({
|
this.links.push({
|
||||||
title: element.name,
|
title: element.name,
|
||||||
to: `/recipes/${element.slug}`,
|
to: `/recipes/${element.slug}`,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue