debian-mirror-gitlab/app/assets/javascripts/boards/components/board_app.vue
2022-07-23 20:15:48 +02:00

33 lines
888 B
Vue

<script>
import { mapGetters } from 'vuex';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import BoardContent from '~/boards/components/board_content.vue';
import BoardSettingsSidebar from '~/boards/components/board_settings_sidebar.vue';
import BoardTopBar from '~/boards/components/board_top_bar.vue';
export default {
components: {
BoardContent,
BoardSettingsSidebar,
BoardTopBar,
},
inject: ['disabled'],
computed: {
...mapGetters(['isSidebarOpen']),
},
created() {
window.addEventListener('popstate', refreshCurrentPage);
},
destroyed() {
window.removeEventListener('popstate', refreshCurrentPage);
},
};
</script>
<template>
<div class="boards-app gl-relative" :class="{ 'is-compact': isSidebarOpen }">
<board-top-bar />
<board-content :disabled="disabled" />
<board-settings-sidebar />
</div>
</template>