summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merging.vue
blob: 247877a82359363e766fecab328e705b595c9dc9 (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
<script>
import { MERGE_ACTIVE_STATUS_PHRASES } from '../../constants';
import statusIcon from '../mr_widget_status_icon.vue';

export default {
  name: 'MRWidgetMerging',
  components: {
    statusIcon,
  },
  props: {
    mr: {
      type: Object,
      required: true,
    },
  },
  data() {
    const statusCount = MERGE_ACTIVE_STATUS_PHRASES.length;

    return {
      mergeStatus: MERGE_ACTIVE_STATUS_PHRASES[Math.floor(Math.random() * statusCount)],
    };
  },
};
</script>
<template>
  <div class="mr-widget-body mr-state-locked media">
    <status-icon status="loading" />
    <div class="media-body">
      <h4>
        {{ mergeStatus.message }}
        <gl-emoji :data-name="mergeStatus.emoji" />
      </h4>
      <section class="mr-info-list">
        <p>
          {{ s__('mrWidget|Merges changes into') }}
          <span class="label-branch">
            <a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a>
          </span>
        </p>
      </section>
    </div>
  </div>
</template>