Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issuable_assignees.vue « assignees « components « sidebar « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c1b3afe8899ff81763c89f2ecc8c55c8fee1310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<script>
import { GlButton } from '@gitlab/ui';
import { n__ } from '~/locale';
import UncollapsedAssigneeList from '~/sidebar/components/assignees/uncollapsed_assignee_list.vue';

export default {
  components: {
    GlButton,
    UncollapsedAssigneeList,
  },
  inject: ['rootPath'],
  props: {
    users: {
      type: Array,
      required: true,
    },
  },
  computed: {
    assigneesText() {
      return n__('Assignee', '%d Assignees', this.users.length);
    },
    emptyUsers() {
      return this.users.length === 0;
    },
  },
};
</script>

<template>
  <div class="gl-display-flex gl-flex-direction-column">
    <div v-if="emptyUsers" data-testid="none">
      <span> {{ __('None') }} -</span>
      <gl-button
        data-testid="assign-yourself"
        category="tertiary"
        variant="link"
        @click="$emit('assign-self')"
      >
        <span class="gl-text-gray-400">{{ __('assign yourself') }}</span>
      </gl-button>
    </div>
    <uncollapsed-assignee-list v-else :users="users" :root-path="rootPath" />
  </div>
</template>