debian-mirror-gitlab/app/assets/javascripts/batch_comments/components/review_bar.vue

40 lines
943 B
Vue
Raw Normal View History

2020-06-23 00:09:42 +05:30
<script>
2021-01-03 14:25:43 +05:30
import { mapActions, mapGetters } from 'vuex';
2020-06-23 00:09:42 +05:30
import PreviewDropdown from './preview_dropdown.vue';
2021-01-03 14:25:43 +05:30
import PublishButton from './publish_button.vue';
2020-06-23 00:09:42 +05:30
export default {
components: {
PreviewDropdown,
2021-01-03 14:25:43 +05:30
PublishButton,
2020-06-23 00:09:42 +05:30
},
computed: {
...mapGetters(['isNotesFetched']),
...mapGetters('batchComments', ['draftsCount']),
},
watch: {
isNotesFetched() {
if (this.isNotesFetched) {
this.expandAllDiscussions();
}
},
},
methods: {
2021-01-03 14:25:43 +05:30
...mapActions('batchComments', ['expandAllDiscussions']),
2020-06-23 00:09:42 +05:30
},
};
</script>
<template>
<div v-show="draftsCount > 0">
2021-09-30 23:02:18 +05:30
<nav class="review-bar-component" data-testid="review_bar_component">
2021-04-17 20:07:23 +05:30
<div
class="review-bar-content d-flex gl-justify-content-end"
data-qa-selector="review_bar_content"
>
2020-06-23 00:09:42 +05:30
<preview-dropdown />
2021-01-03 14:25:43 +05:30
<publish-button class="gl-ml-3" show-count />
2020-06-23 00:09:42 +05:30
</div>
</nav>
</div>
</template>