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

mr_widget_related_links.vue « components « vue_merge_request_widget « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 306026072a3a5b376f4b0746ea5b99fe2c611836 (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
45
46
<script>
import { s__, n__ } from '~/locale';

export default {
  name: 'MRWidgetRelatedLinks',
  props: {
    relatedLinks: {
      type: Object,
      required: true,
      default: () => ({}),
    },
    state: {
      type: String,
      required: false,
      default: '',
    },
  },
  computed: {
    closesText() {
      if (this.state === 'merged') {
        return s__('mrWidget|Closed');
      }
      if (this.state === 'closed') {
        return s__('mrWidget|Did not close');
      }

      return n__('mrWidget|Closes issue', 'mrWidget|Closes issues', this.relatedLinks.closingCount);
    },
  },
};
</script>
<template>
  <section class="mr-info-list gl-ml-7 gl-pb-5">
    <p v-if="relatedLinks.closing">
      {{ closesText }}
      <span v-html="relatedLinks.closing /* eslint-disable-line vue/no-v-html */"></span>
    </p>
    <p v-if="relatedLinks.mentioned">
      {{ n__('mrWidget|Mentions issue', 'mrWidget|Mentions issues', relatedLinks.mentionedCount) }}
      <span v-html="relatedLinks.mentioned /* eslint-disable-line vue/no-v-html */"></span>
    </p>
    <p v-if="relatedLinks.assignToMe">
      <span v-html="relatedLinks.assignToMe /* eslint-disable-line vue/no-v-html */"></span>
    </p>
  </section>
</template>