2019-05-02 23:45:10 +02:00
|
|
|
import setupListeners from './js/setupListeners';
|
2019-05-03 18:34:11 +02:00
|
|
|
import { renderAll } from './js/render';
|
2019-05-23 23:26:13 +02:00
|
|
|
import { hasToken } from './js/utilities';
|
2019-05-08 23:23:46 +02:00
|
|
|
import { loadDictionary } from './js/dictionaryManagement';
|
2019-05-09 22:24:47 +02:00
|
|
|
import { loadSettings } from './js/settings';
|
2019-05-02 23:45:10 +02:00
|
|
|
|
2019-05-02 18:57:56 +02:00
|
|
|
function initialize() {
|
2019-05-23 23:26:13 +02:00
|
|
|
loadDictionary();
|
|
|
|
loadSettings();
|
|
|
|
setupListeners();
|
|
|
|
|
2019-05-22 00:29:05 +02:00
|
|
|
if (hasToken()) {
|
|
|
|
import('./js/account/index.js').then(account => {
|
|
|
|
account.loginWithToken();
|
|
|
|
});
|
|
|
|
}
|
2019-05-23 23:26:13 +02:00
|
|
|
|
2019-05-03 18:34:11 +02:00
|
|
|
renderAll();
|
2019-05-02 18:57:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
window.onload = (function (oldLoad) {
|
|
|
|
return function () {
|
|
|
|
oldLoad && oldLoad();
|
|
|
|
initialize();
|
|
|
|
}
|
|
|
|
})(window.onload);
|