gitlab-org--gitlab-foss/app/assets/javascripts/mr_notes/index.js

39 lines
1.1 KiB
JavaScript
Raw Normal View History

import Vue from 'vue';
import store from '~/mr_notes/stores';
import initNotesApp from './init_notes';
2018-06-21 08:22:40 -04:00
import initDiffsApp from '../diffs';
import discussionCounter from '../notes/components/discussion_counter.vue';
import initDiscussionFilters from '../notes/discussion_filters';
import initSortDiscussions from '../notes/sort_discussions';
2018-06-21 08:22:40 -04:00
import MergeRequest from '../merge_request';
import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
2018-03-02 16:16:11 -05:00
export default function initMrNotes() {
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,
});
initNotesApp();
2018-03-16 16:16:21 -04:00
// eslint-disable-next-line no-new
new Vue({
el: '#js-vue-discussion-counter',
2018-06-21 08:22:40 -04:00
name: 'DiscussionCounter',
components: {
discussionCounter,
},
store,
render(createElement) {
return createElement('discussion-counter');
},
});
2018-06-21 08:22:40 -04:00
initDiscussionFilters(store);
initSortDiscussions(store);
2018-06-21 08:22:40 -04:00
initDiffsApp(store);
2018-03-02 16:16:11 -05:00
}