mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
fix open/close bug
This commit is contained in:
parent
38018ddcfb
commit
5df1c906d0
2 changed files with 8 additions and 23 deletions
|
@ -88,7 +88,7 @@ export default {
|
||||||
this.$router.push(`/recipe/${slug}`);
|
this.$router.push(`/recipe/${slug}`);
|
||||||
},
|
},
|
||||||
openSidebar() {
|
openSidebar() {
|
||||||
this.$refs.theSidebar.forceOpen();
|
this.$refs.theSidebar.toggleSidebar();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<v-navigation-drawer
|
<v-navigation-drawer v-model="showSidebar" width="180px" clipped app>
|
||||||
:value="mobile ? showSidebar : true"
|
|
||||||
v-model="showSidebar"
|
|
||||||
width="180px"
|
|
||||||
clipped
|
|
||||||
app
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-list-item two-line v-if="isLoggedIn">
|
<v-list-item two-line v-if="isLoggedIn">
|
||||||
<v-list-item-avatar color="accent" class="white--text">
|
<v-list-item-avatar color="accent" class="white--text">
|
||||||
|
@ -84,7 +78,6 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showSidebar: false,
|
showSidebar: false,
|
||||||
mobile: false,
|
|
||||||
links: [],
|
links: [],
|
||||||
|
|
||||||
latestVersion: null,
|
latestVersion: null,
|
||||||
|
@ -211,6 +204,9 @@ export default {
|
||||||
isLoggedIn() {
|
isLoggedIn() {
|
||||||
return this.$store.getters.getIsLoggedIn;
|
return this.$store.getters.getIsLoggedIn;
|
||||||
},
|
},
|
||||||
|
isMobile() {
|
||||||
|
return this.$vuetify.breakpoint.name === "xs";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -218,24 +214,13 @@ export default {
|
||||||
this.hideImage == false;
|
this.hideImage == false;
|
||||||
},
|
},
|
||||||
resetView() {
|
resetView() {
|
||||||
this.mobile = this.viewScale();
|
this.showSidebar = !this.isMobile;
|
||||||
this.showSidebar = !this.viewScale();
|
|
||||||
},
|
},
|
||||||
forceOpen() {
|
toggleSidebar() {
|
||||||
this.showSidebar = !this.showSidebar;
|
this.showSidebar = !this.showSidebar;
|
||||||
},
|
},
|
||||||
closeSidebar() {
|
closeSidebar() {
|
||||||
this.showSidebar = !this.showSidebar;
|
this.showSidebar = false;
|
||||||
},
|
|
||||||
viewScale() {
|
|
||||||
switch (this.$vuetify.breakpoint.name) {
|
|
||||||
case "xs":
|
|
||||||
return true;
|
|
||||||
case "sm":
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async getVersion() {
|
async getVersion() {
|
||||||
let response = await axios.get(
|
let response = await axios.get(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue