debian-mirror-gitlab/app/assets/javascripts/notes/components/notes_activity_header.vue

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

64 lines
1.7 KiB
Vue
Raw Normal View History

2022-11-25 23:54:43 +05:30
<script>
2023-07-09 08:55:56 +05:30
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
2022-11-25 23:54:43 +05:30
import DiscussionFilter from './discussion_filter.vue';
export default {
components: {
TimelineToggle: () => import('./timeline_toggle.vue'),
DiscussionFilter,
2023-07-09 08:55:56 +05:30
AiSummarizeNotes: () =>
import('ee_component/notes/components/note_actions/ai_summarize_notes.vue'),
MrDiscussionFilter: () => import('./mr_discussion_filter.vue'),
2022-11-25 23:54:43 +05:30
},
2023-07-09 08:55:56 +05:30
mixins: [glFeatureFlagsMixin()],
2022-11-25 23:54:43 +05:30
inject: {
showTimelineViewToggle: {
default: false,
},
2023-07-09 08:55:56 +05:30
resourceGlobalId: { default: null },
mrFilter: {
default: false,
},
2022-11-25 23:54:43 +05:30
},
props: {
notesFilters: {
type: Array,
required: true,
},
notesFilterValue: {
type: Number,
default: undefined,
required: false,
},
2023-07-09 08:55:56 +05:30
aiLoading: {
type: Boolean,
default: false,
required: false,
},
},
computed: {
showAiActions() {
return this.resourceGlobalId && this.glFeatures.summarizeComments;
},
2022-11-25 23:54:43 +05:30
},
};
</script>
<template>
<div
2023-06-20 00:43:36 +05:30
class="gl-display-flex gl-sm-align-items-center gl-flex-direction-column gl-sm-flex-direction-row gl-justify-content-space-between gl-pt-5 gl-pb-3"
2022-11-25 23:54:43 +05:30
>
<h2 class="gl-font-size-h1 gl-m-0">{{ __('Activity') }}</h2>
<div class="gl-display-flex gl-gap-3 gl-w-full gl-sm-w-auto gl-mt-3 gl-sm-mt-0">
2023-07-09 08:55:56 +05:30
<ai-summarize-notes
v-if="showAiActions"
:resource-global-id="resourceGlobalId"
:loading="aiLoading"
/>
2022-11-25 23:54:43 +05:30
<timeline-toggle v-if="showTimelineViewToggle" />
2023-07-09 08:55:56 +05:30
<mr-discussion-filter v-if="mrFilter && glFeatures.mrActivityFilters" />
<discussion-filter v-else :filters="notesFilters" :selected-value="notesFilterValue" />
2022-11-25 23:54:43 +05:30
</div>
</div>
</template>