summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/environments/components/empty_state.vue
blob: 563fa6c96fb6b72861826aade9093eff4c7d9af0 (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__ } from '~/locale';
import { ENVIRONMENTS_SCOPE } from '../constants';

export default {
  name: 'EnvironmentsEmptyState',
  props: {
    helpPath: {
      type: String,
      required: true,
    },
    scope: {
      type: String,
      required: true,
    },
  },
  computed: {
    title() {
      return this.$options.i18n.title[this.scope];
    },
  },
  i18n: {
    title: {
      [ENVIRONMENTS_SCOPE.AVAILABLE]: s__("Environments|You don't have any environments."),
      [ENVIRONMENTS_SCOPE.STOPPED]: s__("Environments|You don't have any stopped environments."),
    },
    content: s__(
      'Environments|Environments are places where code gets deployed, such as staging or production.',
    ),
    link: s__('Environments|How do I create an environment?'),
  },
};
</script>
<template>
  <div class="empty-state">
    <div class="text-content">
      <h4 class="js-blank-state-title">
        {{ title }}
      </h4>
      <p>
        {{ $options.i18n.content }}
        <a :href="helpPath"> {{ $options.i18n.link }} </a>
      </p>
    </div>
  </div>
</template>