debian-mirror-gitlab/app/assets/javascripts/whats_new/index.js
2021-01-03 14:25:43 +05:30

28 lines
579 B
JavaScript

import Vue from 'vue';
import App from './components/app.vue';
import store from './store';
let whatsNewApp;
export default () => {
if (whatsNewApp) {
store.dispatch('openDrawer');
} else {
const whatsNewElm = document.getElementById('whats-new-app');
whatsNewApp = new Vue({
el: whatsNewElm,
store,
components: {
App,
},
render(createElement) {
return createElement('app', {
props: {
storageKey: whatsNewElm.getAttribute('data-storage-key'),
},
});
},
});
}
};