debian-mirror-gitlab/app/assets/javascripts/batch_comments/components/review_bar.vue
2021-01-30 21:13:32 +05:30

36 lines
861 B
Vue

<script>
import { mapActions, mapGetters } from 'vuex';
import PreviewDropdown from './preview_dropdown.vue';
import PublishButton from './publish_button.vue';
export default {
components: {
PreviewDropdown,
PublishButton,
},
computed: {
...mapGetters(['isNotesFetched']),
...mapGetters('batchComments', ['draftsCount']),
},
watch: {
isNotesFetched() {
if (this.isNotesFetched) {
this.expandAllDiscussions();
}
},
},
methods: {
...mapActions('batchComments', ['expandAllDiscussions']),
},
};
</script>
<template>
<div v-show="draftsCount > 0">
<nav class="review-bar-component">
<div class="review-bar-content qa-review-bar d-flex gl-justify-content-end">
<preview-dropdown />
<publish-button class="gl-ml-3" show-count />
</div>
</nav>
</div>
</template>