[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 */ /* (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 */ /* (2) Set router hooks to load page data before loading content */
gs.get.router.beforeEach((to, from, next) => { gs.get.router.beforeEach((to, from, next) => {
@ -45,4 +45,6 @@ new Vue({
el: '#vue', el: '#vue',
router: gs.get.router, router: gs.get.router,
render(h){ return h(wrapper); } 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 WebSocketClientDriver from './lib/client/ws.js'
import APIClient from './lib/api-client.js' import APIClient from './lib/api-client.js'
export default new Promise( (res, rej) => {
/* (1) Custom lib accessors /* (1) Custom lib accessors
---------------------------------------------------------*/ ---------------------------------------------------------*/
/* (1) Field validation */ /* (1) Field validation */
@ -65,10 +67,6 @@ Notification.requestPermission();
window.DEBUG_MOD = false; window.DEBUG_MOD = false;
res();
});