debian-mirror-gitlab/app/assets/javascripts/mr_notes/discussion_counter.js

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

29 lines
665 B
JavaScript
Raw Normal View History

2023-03-04 22:38:38 +05:30
import Vue from 'vue';
import DiscussionCounter from '~/notes/components/discussion_counter.vue';
import store from '~/mr_notes/stores';
export function initDiscussionCounter() {
const el = document.getElementById('js-vue-discussion-counter');
if (el) {
const { blocksMerge } = el.dataset;
// eslint-disable-next-line no-new
new Vue({
el,
name: 'DiscussionCounter',
components: {
DiscussionCounter,
},
store,
render(createElement) {
return createElement('discussion-counter', {
props: {
blocksMerge: blocksMerge === 'true',
},
});
},
});
}
}