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

hidden_badge.vue « components « issuable « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a80dc2f62d4639dd303362a13d0b5131a225bf9c (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
<script>
import { GlBadge, GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { issuableTypeText } from '~/issues/constants';
import { __, sprintf } from '~/locale';

export default {
  components: {
    GlBadge,
    GlIcon,
  },
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  props: {
    issuableType: {
      type: String,
      required: false,
      default: '',
    },
  },
  computed: {
    title() {
      return sprintf(__('This %{issuable} is hidden because its author has been banned.'), {
        issuable: issuableTypeText[this.issuableType],
      });
    },
  },
};
</script>

<template>
  <gl-badge v-gl-tooltip :title="title" variant="warning">
    <gl-icon name="spam" />
    <span class="gl-sr-only">{{ __('Hidden') }}</span>
  </gl-badge>
</template>