Commit e9c6f58e authored by Filipa Lacerda's avatar Filipa Lacerda

[ci skip] Fix conflicts

parent 2a31a850
import Vue from 'vue'; import Vue from 'vue';
import { mapActions } from 'vuex';
import { convertPermissionToBoolean } from '../lib/utils/common_utils';
import ide from './components/ide.vue'; import ide from './components/ide.vue';
import store from './stores'; import store from './stores';
import router from './ide_router'; import router from './ide_router';
import Translate from '../vue_shared/translate'; import Translate from '../vue_shared/translate';
import ContextualSidebar from '../contextual_sidebar';
function initIde(el) { function initIde(el) {
if (!el) return null; if (!el) return null;
...@@ -18,30 +14,13 @@ function initIde(el) { ...@@ -18,30 +14,13 @@ function initIde(el) {
components: { components: {
ide, ide,
}, },
created() { render(createElement) {
const data = el.dataset; return createElement('ide', {
props: {
this.setInitialData({ emptyStateSvgPath: el.dataset.emptyStateSvgPath,
endpoints: {
rootEndpoint: data.url,
newMergeRequestUrl: data.newMergeRequestUrl,
rootUrl: data.rootUrl,
}, },
canCommit: convertPermissionToBoolean(data.canCommit),
onTopOfBranch: convertPermissionToBoolean(data.onTopOfBranch),
path: data.currentPath,
isRoot: convertPermissionToBoolean(data.root),
isInitialRoot: convertPermissionToBoolean(data.root),
}); });
}, },
methods: {
...mapActions([
'setInitialData',
]),
},
render(createElement) {
return createElement('ide');
},
}); });
} }
...@@ -50,6 +29,3 @@ const ideElement = document.getElementById('ide'); ...@@ -50,6 +29,3 @@ const ideElement = document.getElementById('ide');
Vue.use(Translate); Vue.use(Translate);
initIde(ideElement); initIde(ideElement);
const contextualSidebar = new ContextualSidebar();
contextualSidebar.bindEvents();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment