debian-mirror-gitlab/app/assets/javascripts/projects/compare/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
955 B
JavaScript
Raw Normal View History

2021-03-11 19:13:27 +05:30
import Vue from 'vue';
import CompareApp from './components/app.vue';
export default function init() {
const el = document.getElementById('js-compare-selector');
2021-04-17 20:07:23 +05:30
2021-03-11 19:13:27 +05:30
const {
2022-08-27 11:52:29 +05:30
sourceProjectRefsPath,
targetProjectRefsPath,
2021-03-11 19:13:27 +05:30
paramsFrom,
paramsTo,
projectCompareIndexPath,
projectMergeRequestPath,
createMrPath,
2022-08-27 11:52:29 +05:30
sourceProject,
targetProject,
2021-10-27 15:23:28 +05:30
projectsFrom,
2021-03-11 19:13:27 +05:30
} = el.dataset;
return new Vue({
el,
components: {
2021-10-27 15:23:28 +05:30
CompareApp,
2021-03-11 19:13:27 +05:30
},
render(createElement) {
2021-10-27 15:23:28 +05:30
return createElement(CompareApp, {
2021-03-11 19:13:27 +05:30
props: {
2022-08-27 11:52:29 +05:30
sourceProjectRefsPath,
targetProjectRefsPath,
2021-03-11 19:13:27 +05:30
paramsFrom,
paramsTo,
projectCompareIndexPath,
projectMergeRequestPath,
createMrPath,
2022-08-27 11:52:29 +05:30
sourceProject: JSON.parse(sourceProject),
targetProject: JSON.parse(targetProject),
2021-10-27 15:23:28 +05:30
projects: JSON.parse(projectsFrom),
2021-03-11 19:13:27 +05:30
},
});
},
});
}