filebrowser/frontend/src/views/Layout.vue

43 lines
1001 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>
import { mapState, mapGetters } from 'vuex'
2018-02-01 12:17:04 +00:00
import Sidebar from '@/components/Sidebar'
import Prompts from '@/components/prompts/Prompts'
import Shell from '@/components/Shell'
2020-10-01 14:45:24 +00:00
import { enableExec } from '@/utils/constants'
2018-02-01 12:17:04 +00:00
export default {
name: 'layout',
components: {
Sidebar,
Prompts,
Shell
},
computed: {
...mapGetters([ 'isLogged', 'progress' ]),
2020-10-01 14:45:24 +00:00
...mapState([ 'user' ]),
isExecEnabled: () => enableExec
2018-02-01 12:17:04 +00:00
},
watch: {
'$route': function () {
this.$store.commit('resetSelected')
this.$store.commit('multiple', false)
if (this.$store.state.show !== 'success') this.$store.commit('closeHovers')
}
}
}
</script>