2018-11-08 19:23:39 +05:30
|
|
|
<script>
|
2019-02-15 15:39:39 +05:30
|
|
|
import { mapGetters } from 'vuex';
|
2020-05-24 23:13:21 +05:30
|
|
|
import { escape } from 'lodash';
|
2020-07-28 23:09:34 +05:30
|
|
|
import { GlButton } from '@gitlab/ui';
|
2019-02-15 15:39:39 +05:30
|
|
|
import { __, sprintf } from '~/locale';
|
2018-11-08 19:23:39 +05:30
|
|
|
|
|
|
|
export default {
|
2019-02-15 15:39:39 +05:30
|
|
|
components: {
|
2020-07-28 23:09:34 +05:30
|
|
|
GlButton,
|
2019-02-15 15:39:39 +05:30
|
|
|
},
|
|
|
|
props: {
|
|
|
|
changesEmptyStateIllustration: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
2018-11-08 19:23:39 +05:30
|
|
|
},
|
|
|
|
computed: {
|
2019-02-15 15:39:39 +05:30
|
|
|
...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-05-24 23:13:21 +05:30
|
|
|
source_branch: escape(this.getNoteableData.source_branch),
|
|
|
|
target_branch: escape(this.getNoteableData.target_branch),
|
2019-02-15 15:39:39 +05:30
|
|
|
},
|
|
|
|
false,
|
|
|
|
);
|
|
|
|
},
|
2018-11-08 19:23:39 +05:30
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2019-02-15 15:39:39 +05:30
|
|
|
<div class="row empty-state">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="svg-content svg-250"><img :src="changesEmptyStateIllustration" /></div>
|
2018-11-08 19:23:39 +05:30
|
|
|
</div>
|
2019-02-15 15:39:39 +05:30
|
|
|
<div class="col-12">
|
2018-11-08 19:23:39 +05:30
|
|
|
<div class="text-content text-center">
|
2019-02-15 15:39:39 +05:30
|
|
|
<span v-html="emptyStateText"></span>
|
2018-11-08 19:23:39 +05:30
|
|
|
<div class="text-center">
|
2020-07-28 23:09:34 +05:30
|
|
|
<gl-button :href="getNoteableData.new_blob_path" variant="success" category="primary">{{
|
2019-02-15 15:39:39 +05:30
|
|
|
__('Create commit')
|
2020-07-28 23:09:34 +05:30
|
|
|
}}</gl-button>
|
2018-11-08 19:23:39 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|