summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/integrations/edit/components/jira_upgrade_cta.vue
blob: 9164e4844409c5b708b32068fca769d138037487 (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
<script>
import { GlButton, GlCard } from '@gitlab/ui';
import { s__, __ } from '~/locale';

export default {
  components: {
    GlButton,
    GlCard,
  },
  props: {
    upgradePlanPath: {
      type: String,
      required: false,
      default: '',
    },
    showPremiumMessage: {
      type: Boolean,
      required: false,
      default: false,
    },
    showUltimateMessage: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  computed: {
    title() {
      return this.showUltimateMessage
        ? this.$options.i18n.titleUltimate
        : this.$options.i18n.titlePremium;
    },
  },
  i18n: {
    titleUltimate: s__('JiraService|This is an Ultimate feature'),
    titlePremium: s__('JiraService|This is a Premium feature'),
    content: s__('JiraService|Upgrade your plan to enable this feature of the Jira Integration.'),
    upgrade: __('Upgrade your plan'),
  },
};
</script>

<template>
  <gl-card>
    <strong>{{ title }}</strong>
    <p>{{ $options.i18n.content }}</p>
    <gl-button v-if="upgradePlanPath" category="primary" variant="info" :href="upgradePlanPath">
      {{ $options.i18n.upgrade }}
    </gl-button>
  </gl-card>
</template>