summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/no_changes.vue
blob: d817157fbcd4922e6d5fced465334ea8ccc7facd (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
<script>
import { mapState } from 'vuex';
import emptyImage from '~/../../views/shared/icons/_mr_widget_empty_state.svg';

export default {
  data() {
    return {
      emptyImage,
    };
  },
  computed: {
    ...mapState({
      sourceBranch: state => state.notes.noteableData.source_branch,
      targetBranch: state => state.notes.noteableData.target_branch,
      newBlobPath: state => state.notes.noteableData.new_blob_path,
    }),
  },
};
</script>

<template>
  <div
    class="row empty-state nothing-here-block"
  >
    <div class="col-xs-12">
      <div class="svg-content">
        <span
          v-html="emptyImage"
        ></span>
      </div>
    </div>
    <div class="col-xs-12">
      <div class="text-content text-center">
        No changes between
        <span class="ref-name">{{ sourceBranch }}</span>
        and
        <span class="ref-name">{{ targetBranch }}</span>
        <div class="text-center">
          <a
            :href="newBlobPath"
            class="btn btn-save"
          >
            {{ __('Create commit') }}
          </a>
        </div>
      </div>
    </div>
  </div>
</template>