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

empty_state_with_any_issues.vue « components « list « issues « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c58843bcbc7d20a872971f7ac152c206171200b (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 { GlButton, GlEmptyState } from '@gitlab/ui';
import { i18n } from '../constants';

export default {
  i18n,
  components: {
    GlButton,
    GlEmptyState,
  },
  inject: ['emptyStateSvgPath', 'newIssuePath', 'showNewIssueLink'],
  props: {
    hasSearch: {
      type: Boolean,
      required: true,
    },
    isOpenTab: {
      type: Boolean,
      required: true,
    },
  },
};
</script>

<template>
  <gl-empty-state
    v-if="hasSearch"
    :description="$options.i18n.noSearchResultsDescription"
    :title="$options.i18n.noSearchResultsTitle"
    :svg-path="emptyStateSvgPath"
    :svg-height="150"
  >
    <template #actions>
      <gl-button v-if="showNewIssueLink" :href="newIssuePath" variant="confirm">
        {{ $options.i18n.newIssueLabel }}
      </gl-button>
    </template>
  </gl-empty-state>

  <gl-empty-state
    v-else-if="isOpenTab"
    :description="$options.i18n.noOpenIssuesDescription"
    :title="$options.i18n.noOpenIssuesTitle"
    :svg-path="emptyStateSvgPath"
  >
    <template #actions>
      <gl-button v-if="showNewIssueLink" :href="newIssuePath" variant="confirm">
        {{ $options.i18n.newIssueLabel }}
      </gl-button>
    </template>
  </gl-empty-state>

  <gl-empty-state
    v-else
    :title="$options.i18n.noClosedIssuesTitle"
    :svg-path="emptyStateSvgPath"
    :svg-height="150"
  />
</template>