Commit 06157e05 authored by Illya Klymov's avatar Illya Klymov

Address reviewer comments

* switch from gon to provide
parent 59b84720
......@@ -39,6 +39,8 @@ export default {
TimeAgo,
},
inject: ['assets'],
data() {
return {
loading: true,
......@@ -122,8 +124,6 @@ export default {
this.paginationConfig.page = 1;
},
},
gitlabLogo: window.gon.gitlab_logo,
};
</script>
......@@ -133,7 +133,7 @@ export default {
class="gl-border-solid gl-border-gray-200 gl-border-0 gl-border-b-1 gl-display-flex gl-align-items-center"
>
<h1 class="gl-my-0 gl-py-4 gl-font-size-h1">
<img :src="$options.gitlabLogo" class="gl-w-6 gl-h-6 gl-mb-2 gl-display-inline gl-mr-2" />
<img :src="assets.gitlabLogo" class="gl-w-6 gl-h-6 gl-mb-2 gl-display-inline gl-mr-2" />
{{ s__('BulkImport|Project import history') }}
</h1>
</div>
......
......@@ -6,6 +6,12 @@ function mountImportHistoryApp(mountElement) {
return new Vue({
el: mountElement,
name: 'ImportHistoryRoot',
provide: {
assets: {
gitlabLogo: mountElement.dataset.logo,
},
},
render(createElement) {
return createElement(ImportHistoryApp);
},
......
- add_to_breadcrumbs _('Create a new project'), new_project_path
- page_title _('Import history')
#import-history-mount-element
#import-history-mount-element{ data: { logo: asset_url('gitlab_logo.png') } }
......@@ -52,10 +52,10 @@ describe('ImportHistoryApp', () => {
function createComponent({ shallow = true } = {}) {
const mountFn = shallow ? shallowMount : mount;
wrapper = mountFn(
ImportHistoryApp,
shallow ? { stubs: { GlTable: { ...stubComponent(GlTable), props: ['items'] } } } : {},
);
wrapper = mountFn(ImportHistoryApp, {
provide: { assets: { gitlabLogo: 'http://dummy.host' } },
stubs: shallow ? { GlTable: { ...stubComponent(GlTable), props: ['items'] } } : {},
});
}
const originalApiVersion = gon.api_version;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment