debian-mirror-gitlab/app/assets/javascripts/design_management/index.js

34 lines
719 B
JavaScript
Raw Normal View History

2020-05-24 23:13:21 +05:30
import Vue from 'vue';
import createRouter from './router';
import App from './components/app.vue';
import apolloProvider from './graphql';
export default () => {
2020-11-24 15:15:51 +05:30
const el = document.querySelector('.js-design-management');
2020-05-24 23:13:21 +05:30
const { issueIid, projectPath, issuePath } = el.dataset;
const router = createRouter(issuePath);
apolloProvider.clients.defaultClient.cache.writeData({
data: {
activeDiscussion: {
__typename: 'ActiveDiscussion',
id: null,
source: null,
},
},
});
return new Vue({
el,
router,
apolloProvider,
2020-10-24 23:57:45 +05:30
provide: {
projectPath,
issueIid,
},
2020-05-24 23:13:21 +05:30
render(createElement) {
return createElement(App);
},
});
};