debian-mirror-gitlab/app/assets/javascripts/vue_merge_request_widget/index.js
2020-10-24 23:57:45 +05:30

25 lines
662 B
JavaScript

import Vue from 'vue';
import MrWidgetOptions from 'ee_else_ce/vue_merge_request_widget/mr_widget_options.vue';
import VueApollo from 'vue-apollo';
import Translate from '../vue_shared/translate';
import createDefaultClient from '~/lib/graphql';
Vue.use(Translate);
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(),
});
export default () => {
if (gl.mrWidget) return;
gl.mrWidgetData.gitlabLogo = gon.gitlab_logo;
gl.mrWidgetData.defaultAvatarUrl = gon.default_avatar_url;
const vm = new Vue({ ...MrWidgetOptions, apolloProvider });
window.gl.mrWidget = {
checkStatus: vm.checkStatus,
};
};