fix: fix sidebar navigation on mobile devices (#1618)
parent
6f345be3e4
commit
f09bf3e1d0
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<nav :class="{ active }">
|
<nav :class="{ active }">
|
||||||
<template v-if="isLogged">
|
<template v-if="isLogged">
|
||||||
<router-link
|
<button
|
||||||
class="action"
|
class="action"
|
||||||
to="/files/"
|
@click="toRoot"
|
||||||
:aria-label="$t('sidebar.myFiles')"
|
:aria-label="$t('sidebar.myFiles')"
|
||||||
:title="$t('sidebar.myFiles')"
|
:title="$t('sidebar.myFiles')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">folder</i>
|
<i class="material-icons">folder</i>
|
||||||
<span>{{ $t("sidebar.myFiles") }}</span>
|
<span>{{ $t("sidebar.myFiles") }}</span>
|
||||||
</router-link>
|
</button>
|
||||||
|
|
||||||
<div v-if="user.perm.create">
|
<div v-if="user.perm.create">
|
||||||
<button
|
<button
|
||||||
|
@ -34,15 +34,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<router-link
|
<button
|
||||||
class="action"
|
class="action"
|
||||||
to="/settings"
|
@click="toSettings"
|
||||||
:aria-label="$t('sidebar.settings')"
|
:aria-label="$t('sidebar.settings')"
|
||||||
:title="$t('sidebar.settings')"
|
:title="$t('sidebar.settings')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">settings_applications</i>
|
<i class="material-icons">settings_applications</i>
|
||||||
<span>{{ $t("sidebar.settings") }}</span>
|
<span>{{ $t("sidebar.settings") }}</span>
|
||||||
</router-link>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
v-if="authMethod == 'json'"
|
v-if="authMethod == 'json'"
|
||||||
|
@ -125,6 +125,14 @@ export default {
|
||||||
authMethod: () => authMethod,
|
authMethod: () => authMethod,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toRoot() {
|
||||||
|
this.$router.push({ path: "/files/" }, () => {});
|
||||||
|
this.$store.commit("closeHovers");
|
||||||
|
},
|
||||||
|
toSettings() {
|
||||||
|
this.$router.push({ path: "/settings" }, () => {});
|
||||||
|
this.$store.commit("closeHovers");
|
||||||
|
},
|
||||||
help() {
|
help() {
|
||||||
this.$store.commit("showHover", "help");
|
this.$store.commit("showHover", "help");
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue