2018-03-27 19:54:05 +05:30
|
|
|
import Vue from 'vue';
|
2019-05-18 00:54:41 +05:30
|
|
|
import store from 'ee_else_ce/mr_notes/stores';
|
|
|
|
import initNotesApp from './init_notes';
|
2018-11-08 19:23:39 +05:30
|
|
|
import initDiffsApp from '../diffs';
|
2018-03-27 19:54:05 +05:30
|
|
|
import discussionCounter from '../notes/components/discussion_counter.vue';
|
2018-12-13 13:39:08 +05:30
|
|
|
import initDiscussionFilters from '../notes/discussion_filters';
|
2018-11-08 19:23:39 +05:30
|
|
|
import MergeRequest from '../merge_request';
|
2019-03-02 22:35:43 +05:30
|
|
|
import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
|
2018-03-27 19:54:05 +05:30
|
|
|
|
|
|
|
export default function initMrNotes() {
|
2019-03-02 22:35:43 +05:30
|
|
|
resetServiceWorkersPublicPath();
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
const mrShowNode = document.querySelector('.merge-request');
|
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new MergeRequest({
|
|
|
|
action: mrShowNode.dataset.mrAction,
|
|
|
|
});
|
|
|
|
|
2019-05-18 00:54:41 +05:30
|
|
|
initNotesApp();
|
2018-03-27 19:54:05 +05:30
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
2018-03-27 19:54:05 +05:30
|
|
|
el: '#js-vue-discussion-counter',
|
2018-11-08 19:23:39 +05:30
|
|
|
name: 'DiscussionCounter',
|
2018-03-27 19:54:05 +05:30
|
|
|
components: {
|
|
|
|
discussionCounter,
|
|
|
|
},
|
|
|
|
store,
|
|
|
|
render(createElement) {
|
|
|
|
return createElement('discussion-counter');
|
|
|
|
},
|
|
|
|
});
|
2018-11-08 19:23:39 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
initDiscussionFilters(store);
|
2018-11-08 19:23:39 +05:30
|
|
|
initDiffsApp(store);
|
2018-03-27 19:54:05 +05:30
|
|
|
}
|