2018-02-27 19:10:43 -05:00
|
|
|
import Vue from 'vue';
|
2019-03-04 06:27:57 -05:00
|
|
|
import store from 'ee_else_ce/mr_notes/stores';
|
|
|
|
import initNotesApp from './init_notes';
|
2018-06-21 08:22:40 -04:00
|
|
|
import initDiffsApp from '../diffs';
|
2018-02-27 19:10:43 -05:00
|
|
|
import discussionCounter from '../notes/components/discussion_counter.vue';
|
2018-10-23 05:49:45 -04:00
|
|
|
import initDiscussionFilters from '../notes/discussion_filters';
|
2020-03-26 05:07:52 -04:00
|
|
|
import initSortDiscussions from '../notes/sort_discussions';
|
2018-06-21 08:22:40 -04:00
|
|
|
import MergeRequest from '../merge_request';
|
2019-02-08 09:06:24 -05:00
|
|
|
import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
|
2018-02-27 19:10:43 -05:00
|
|
|
|
2018-03-02 16:16:11 -05:00
|
|
|
export default function initMrNotes() {
|
2019-02-08 09:06:24 -05:00
|
|
|
resetServiceWorkersPublicPath();
|
|
|
|
|
2018-06-21 08:22:40 -04:00
|
|
|
const mrShowNode = document.querySelector('.merge-request');
|
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new MergeRequest({
|
|
|
|
action: mrShowNode.dataset.mrAction,
|
|
|
|
});
|
|
|
|
|
2019-03-04 06:27:57 -05:00
|
|
|
initNotesApp();
|
2018-02-27 19:10:43 -05:00
|
|
|
|
2018-03-16 16:16:21 -04:00
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
2018-02-27 19:10:43 -05:00
|
|
|
el: '#js-vue-discussion-counter',
|
2018-06-21 08:22:40 -04:00
|
|
|
name: 'DiscussionCounter',
|
2018-02-27 19:10:43 -05:00
|
|
|
components: {
|
|
|
|
discussionCounter,
|
|
|
|
},
|
|
|
|
store,
|
|
|
|
render(createElement) {
|
|
|
|
return createElement('discussion-counter');
|
|
|
|
},
|
|
|
|
});
|
2018-06-21 08:22:40 -04:00
|
|
|
|
2018-10-23 05:49:45 -04:00
|
|
|
initDiscussionFilters(store);
|
2020-03-26 05:07:52 -04:00
|
|
|
initSortDiscussions(store);
|
2018-06-21 08:22:40 -04:00
|
|
|
initDiffsApp(store);
|
2018-03-02 16:16:11 -05:00
|
|
|
}
|