2020-08-13 17:10:04 -04:00
|
|
|
import Vue from 'vue';
|
2020-12-03 13:10:10 -05:00
|
|
|
import { mapState } from 'vuex';
|
2020-08-13 17:10:04 -04:00
|
|
|
import App from './components/app.vue';
|
|
|
|
import store from './store';
|
2021-04-12 17:11:12 -04:00
|
|
|
import { getVersionDigest, setNotification } from './utils/notification';
|
2020-08-13 17:10:04 -04:00
|
|
|
|
2020-09-08 17:08:53 -04:00
|
|
|
let whatsNewApp;
|
2020-08-13 17:10:04 -04:00
|
|
|
|
2020-12-23 16:10:24 -05:00
|
|
|
export default (el) => {
|
2020-09-08 17:08:53 -04:00
|
|
|
if (whatsNewApp) {
|
|
|
|
store.dispatch('openDrawer');
|
|
|
|
} else {
|
|
|
|
whatsNewApp = new Vue({
|
2020-12-03 13:10:10 -05:00
|
|
|
el,
|
2020-09-08 17:08:53 -04:00
|
|
|
store,
|
|
|
|
components: {
|
|
|
|
App,
|
|
|
|
},
|
2020-12-03 13:10:10 -05:00
|
|
|
computed: {
|
|
|
|
...mapState(['open']),
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
open() {
|
|
|
|
setNotification(el);
|
|
|
|
},
|
|
|
|
},
|
2020-09-08 17:08:53 -04:00
|
|
|
render(createElement) {
|
|
|
|
return createElement('app', {
|
2020-12-10 10:10:12 -05:00
|
|
|
props: {
|
2021-04-12 17:11:12 -04:00
|
|
|
versionDigest: getVersionDigest(el),
|
2020-12-10 10:10:12 -05:00
|
|
|
},
|
2020-09-08 17:08:53 -04:00
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2020-08-13 17:10:04 -04:00
|
|
|
};
|