filebrowser/frontend/src/views/Layout.vue

44 lines
1016 B
Vue
Raw Normal View History

2018-02-01 12:17:04 +00:00
<template>
<div>
<div id="progress">
<div v-bind:style="{ width: this.progress + '%' }"></div>
2018-02-01 12:17:04 +00:00
</div>
<sidebar></sidebar>
<main>
<router-view></router-view>
2020-10-01 14:45:24 +00:00
<shell v-if="isExecEnabled && isLogged && user.perm.execute" />
2018-02-01 12:17:04 +00:00
</main>
<prompts></prompts>
</div>
</template>
<script>
2021-03-21 11:51:58 +00:00
import { mapState, mapGetters } from "vuex";
import Sidebar from "@/components/Sidebar";
import Prompts from "@/components/prompts/Prompts";
import Shell from "@/components/Shell";
import { enableExec } from "@/utils/constants";
2018-02-01 12:17:04 +00:00
export default {
2021-03-21 11:51:58 +00:00
name: "layout",
2018-02-01 12:17:04 +00:00
components: {
Sidebar,
Prompts,
2021-03-21 11:51:58 +00:00
Shell,
},
computed: {
2021-03-21 11:51:58 +00:00
...mapGetters(["isLogged", "progress"]),
...mapState(["user"]),
isExecEnabled: () => enableExec,
2018-02-01 12:17:04 +00:00
},
watch: {
2021-03-21 11:51:58 +00:00
$route: function () {
this.$store.commit("resetSelected");
this.$store.commit("multiple", false);
if (this.$store.state.show !== "success")
this.$store.commit("closeHovers");
},
},
};
2018-02-01 12:17:04 +00:00
</script>