summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/no_changes.vue
blob: 25ec157ed25f5c92266bd9d7c86fdce0163e21d3 (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
<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-success"> {{ __('Create commit') }} </a>
        </div>
      </div>
    </div>
  </div>
</template>