[setup] is now an asynchronous Promise()

This commit is contained in:
xdrm-brackets 2018-04-07 16:22:02 +02:00
parent 1baf2b5e06
commit 139184a981
2 changed files with 77 additions and 77 deletions

View File

@ -5,7 +5,7 @@ import noauth_wrapper from './vue/noauth/wrapper.vue'
/* (1) Setup: Vue, VueRouter, Authentication, ClientDriver-s */
require('./setup.js');
require('./setup.js').default.then(() => {
/* (2) Set router hooks to load page data before loading content */
gs.get.router.beforeEach((to, from, next) => {
@ -45,4 +45,6 @@ new Vue({
el: '#vue',
router: gs.get.router,
render(h){ return h(wrapper); }
})
});
});

View File

@ -9,6 +9,8 @@ import XHRClientDriver from './lib/client/xhr.js'
import WebSocketClientDriver from './lib/client/ws.js'
import APIClient from './lib/api-client.js'
export default new Promise( (res, rej) => {
/* (1) Custom lib accessors
---------------------------------------------------------*/
/* (1) Field validation */
@ -65,10 +67,6 @@ Notification.requestPermission();
window.DEBUG_MOD = false;
res();
});