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

unresolved_discussions.vue « states « components « vue_merge_request_widget « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 074758e33b2e024261ddad2c640623c4eacac3bc (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
<script>
import { GlButton } from '@gitlab/ui';
import notesEventHub from '~/notes/event_hub';
import StateContainer from '../state_container.vue';

export default {
  name: 'UnresolvedDiscussions',
  components: {
    GlButton,
    StateContainer,
  },
  props: {
    mr: {
      type: Object,
      required: true,
    },
  },
  methods: {
    jumpToFirstUnresolvedDiscussion() {
      notesEventHub.$emit('jumpToFirstUnresolvedDiscussion');
    },
  },
};
</script>

<template>
  <state-container :mr="mr" status="failed">
    <span
      class="gl-ml-3 gl-font-weight-bold gl-w-100 gl-flex-grow-1 gl-md-mr-3 gl-ml-0! gl-text-body! gl-align-self-start"
    >
      {{ s__('mrWidget|Merge blocked: all threads must be resolved.') }}
    </span>
    <template #actions>
      <gl-button
        data-testid="jump-to-first"
        class="gl-align-self-start gl-vertical-align-top"
        size="small"
        variant="confirm"
        category="primary"
        @click="jumpToFirstUnresolvedDiscussion"
      >
        {{ s__('mrWidget|Jump to first unresolved thread') }}
      </gl-button>
      <gl-button
        v-if="mr.createIssueToResolveDiscussionsPath"
        :href="mr.createIssueToResolveDiscussionsPath"
        class="js-create-issue gl-align-self-start gl-vertical-align-top"
        size="small"
        variant="confirm"
        category="secondary"
      >
        {{ s__('mrWidget|Create issue to resolve all threads') }}
      </gl-button>
    </template>
  </state-container>
</template>