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

29 lines
574 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import Vue from 'vue';
import App from './components/app.vue';
import store from './store';
2020-11-24 15:15:51 +05:30
let whatsNewApp;
2020-10-24 23:57:45 +05:30
2020-11-24 15:15:51 +05:30
export default () => {
if (whatsNewApp) {
store.dispatch('openDrawer');
} else {
const whatsNewElm = document.getElementById('whats-new-app');
2020-10-24 23:57:45 +05:30
2020-11-24 15:15:51 +05:30
whatsNewApp = new Vue({
el: whatsNewElm,
store,
components: {
App,
},
render(createElement) {
return createElement('app', {
props: {
features: whatsNewElm.getAttribute('data-features'),
},
});
},
});
}
2020-10-24 23:57:45 +05:30
};