2018-06-21 08:22:40 -04:00
|
|
|
<script>
|
2020-08-26 05:10:16 -04:00
|
|
|
/* eslint-disable vue/no-v-html */
|
2018-12-13 05:57:45 -05:00
|
|
|
import { mapGetters } from 'vuex';
|
2020-04-21 14:09:31 -04:00
|
|
|
import { escape } from 'lodash';
|
2020-07-13 17:09:24 -04:00
|
|
|
import { GlButton } from '@gitlab/ui';
|
2018-12-13 05:57:45 -05:00
|
|
|
import { __, sprintf } from '~/locale';
|
2018-06-21 08:22:40 -04:00
|
|
|
|
|
|
|
export default {
|
2018-12-13 05:57:45 -05:00
|
|
|
components: {
|
2020-07-13 17:09:24 -04:00
|
|
|
GlButton,
|
2018-12-13 05:57:45 -05:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
changesEmptyStateIllustration: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
2018-06-21 08:22:40 -04:00
|
|
|
},
|
|
|
|
computed: {
|
2018-12-13 05:57:45 -05:00
|
|
|
...mapGetters(['getNoteableData']),
|
|
|
|
emptyStateText() {
|
|
|
|
return sprintf(
|
|
|
|
__(
|
|
|
|
'No changes between %{ref_start}%{source_branch}%{ref_end} and %{ref_start}%{target_branch}%{ref_end}',
|
|
|
|
),
|
|
|
|
{
|
|
|
|
ref_start: '<span class="ref-name">',
|
|
|
|
ref_end: '</span>',
|
2020-04-21 14:09:31 -04:00
|
|
|
source_branch: escape(this.getNoteableData.source_branch),
|
|
|
|
target_branch: escape(this.getNoteableData.target_branch),
|
2018-12-13 05:57:45 -05:00
|
|
|
},
|
|
|
|
false,
|
|
|
|
);
|
|
|
|
},
|
2018-06-21 08:22:40 -04:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2018-12-13 05:57:45 -05:00
|
|
|
<div class="row empty-state">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="svg-content svg-250"><img :src="changesEmptyStateIllustration" /></div>
|
2018-06-21 08:22:40 -04:00
|
|
|
</div>
|
2018-12-13 05:57:45 -05:00
|
|
|
<div class="col-12">
|
2018-06-21 08:22:40 -04:00
|
|
|
<div class="text-content text-center">
|
2018-12-13 05:57:45 -05:00
|
|
|
<span v-html="emptyStateText"></span>
|
2018-06-21 08:22:40 -04:00
|
|
|
<div class="text-center">
|
2020-07-13 17:09:24 -04:00
|
|
|
<gl-button :href="getNoteableData.new_blob_path" variant="success" category="primary">{{
|
2018-12-13 05:57:45 -05:00
|
|
|
__('Create commit')
|
2020-07-13 17:09:24 -04:00
|
|
|
}}</gl-button>
|
2018-06-21 08:22:40 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|