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

empty_state_with_any_issues.vue « components « service_desk « issues « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ab9e70ae2237d295890f54719ffcfeeac7e2d196 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
<script>
import { GlEmptyState } from '@gitlab/ui';
import {
  noSearchResultsTitle,
  noSearchResultsDescription,
  infoBannerUserNote,
  noOpenIssuesTitle,
  noClosedIssuesTitle,
} from '../constants';

export default {
  i18n: {
    noSearchResultsTitle,
    noSearchResultsDescription,
    infoBannerUserNote,
    noOpenIssuesTitle,
    noClosedIssuesTitle,
  },
  components: {
    GlEmptyState,
  },
  inject: ['emptyStateSvgPath'],
  props: {
    hasSearch: {
      type: Boolean,
      required: true,
    },
    isOpenTab: {
      type: Boolean,
      required: true,
    },
  },
  computed: {
    content() {
      if (this.hasSearch) {
        return {
          title: noSearchResultsTitle,
          description: noSearchResultsDescription,
          svgHeight: 150,
        };
      }
      if (this.isOpenTab) {
        return { title: noOpenIssuesTitle, description: infoBannerUserNote };
      }

      return { title: noClosedIssuesTitle, svgHeight: 150 };
    },
  },
};
</script>

<template>
  <gl-empty-state
    :description="content.description"
    :title="content.title"
    :svg-path="emptyStateSvgPath"
    :svg-height="content.svgHeight"
  />
</template>