debian-mirror-gitlab/app/assets/javascripts/sidebar/components/reviewers/reviewer_title.vue

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

51 lines
1.3 KiB
Vue
Raw Normal View History

2021-01-03 14:25:43 +05:30
<script>
// NOTE! For the first iteration, we are simply copying the implementation of Assignees
// It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736
2021-03-08 18:12:59 +05:30
import { GlLoadingIcon } from '@gitlab/ui';
2021-01-03 14:25:43 +05:30
import { n__ } from '~/locale';
export default {
name: 'ReviewerTitle',
components: {
GlLoadingIcon,
},
props: {
loading: {
type: Boolean,
required: false,
default: false,
},
numberOfReviewers: {
type: Number,
required: true,
},
editable: {
type: Boolean,
required: true,
},
},
computed: {
reviewerTitle() {
const reviewers = this.numberOfReviewers;
return n__('Reviewer', `%d Reviewers`, reviewers);
},
},
};
</script>
<template>
2021-09-04 01:27:46 +05:30
<div class="hide-collapsed gl-line-height-20 gl-mb-2 gl-text-gray-900">
2021-01-03 14:25:43 +05:30
{{ reviewerTitle }}
2021-09-30 23:02:18 +05:30
<gl-loading-icon v-if="loading" size="sm" inline class="align-bottom" />
2021-01-03 14:25:43 +05:30
<a
v-if="editable"
2021-10-27 15:23:28 +05:30
class="js-sidebar-dropdown-toggle edit-link btn gl-text-gray-900! gl-ml-auto hide-collapsed btn-default btn-sm gl-button btn-default-tertiary float-right"
2021-01-03 14:25:43 +05:30
href="#"
2021-11-11 11:23:49 +05:30
data-track-action="click_edit_button"
2021-01-03 14:25:43 +05:30
data-track-label="right_sidebar"
data-track-property="reviewer"
>
{{ __('Edit') }}
</a>
</div>
</template>