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

empty_state_without_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: ea866dfb1612cd1229d4435d85a97997f1422630 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<script>
import { GlEmptyState, GlLink } from '@gitlab/ui';
import {
  noIssuesSignedOutButtonText,
  infoBannerTitle,
  infoBannerUserNote,
  infoBannerAdminNote,
  learnMore,
} from '../constants';

export default {
  i18n: {
    noIssuesSignedOutButtonText,
    infoBannerTitle,
    infoBannerUserNote,
    infoBannerAdminNote,
    learnMore,
  },
  components: {
    GlEmptyState,
    GlLink,
  },
  inject: [
    'emptyStateSvgPath',
    'isSignedIn',
    'signInPath',
    'canAdminIssues',
    'isServiceDeskEnabled',
    'serviceDeskEmailAddress',
    'serviceDeskHelpPath',
  ],
  computed: {
    canSeeEmailAddress() {
      return this.canAdminIssues && this.isServiceDeskEnabled;
    },
  },
};
</script>

<template>
  <div v-if="isSignedIn">
    <gl-empty-state
      :title="$options.i18n.infoBannerTitle"
      :svg-path="emptyStateSvgPath"
      :svg-height="null"
      content-class="gl-max-w-80!"
      data-testid="issues-service-desk-empty-state"
    >
      <template #description>
        <p v-if="canSeeEmailAddress">
          {{ $options.i18n.infoBannerAdminNote }} <br /><code>{{ serviceDeskEmailAddress }}</code>
        </p>
        <p>{{ $options.i18n.infoBannerUserNote }}</p>
        <gl-link :href="serviceDeskHelpPath">
          {{ $options.i18n.learnMore }}
        </gl-link>
      </template>
    </gl-empty-state>
  </div>

  <gl-empty-state
    v-else
    :title="$options.i18n.infoBannerTitle"
    :svg-path="emptyStateSvgPath"
    :svg-height="null"
    :primary-button-text="$options.i18n.noIssuesSignedOutButtonText"
    :primary-button-link="signInPath"
    content-class="gl-max-w-80!"
    data-testid="issues-service-desk-empty-state"
  >
    <template #description>
      <p>{{ $options.i18n.infoBannerUserNote }}</p>
      <gl-link :href="serviceDeskHelpPath">
        {{ $options.i18n.learnMore }}
      </gl-link>
    </template>
  </gl-empty-state>
</template>