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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.2 KiB
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';
2022-07-23 23:45:48 +05:30
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
2021-11-11 11:23:49 +05:30
import { REVIEW_BAR_VISIBLE_CLASS_NAME } from '../constants';
2020-06-23 00:09:42 +05:30
import PreviewDropdown from './preview_dropdown.vue';
2022-07-23 23:45:48 +05:30
import SubmitDropdown from './submit_dropdown.vue';
2020-06-23 00:09:42 +05:30
export default {
components: {
PreviewDropdown,
2022-07-23 23:45:48 +05:30
SubmitDropdown,
2020-06-23 00:09:42 +05:30
},
2022-07-23 23:45:48 +05:30
mixins: [glFeatureFlagMixin()],
2020-06-23 00:09:42 +05:30
computed: {
...mapGetters(['isNotesFetched']),
},
watch: {
isNotesFetched() {
if (this.isNotesFetched) {
this.expandAllDiscussions();
}
},
},
2021-11-11 11:23:49 +05:30
mounted() {
document.body.classList.add(REVIEW_BAR_VISIBLE_CLASS_NAME);
},
beforeDestroy() {
document.body.classList.remove(REVIEW_BAR_VISIBLE_CLASS_NAME);
},
2020-06-23 00:09:42 +05:30
methods: {
2021-01-03 14:25:43 +05:30
...mapActions('batchComments', ['expandAllDiscussions']),
2020-06-23 00:09:42 +05:30
},
};
</script>
<template>
2021-11-11 11:23:49 +05:30
<div>
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 />
2023-04-23 21:23:45 +05:30
<submit-dropdown />
2020-06-23 00:09:42 +05:30
</div>
</nav>
</div>
</template>