Add more configurable options and add a new way to use custom config

This commit is contained in:
yflory
2018-01-22 16:56:37 +01:00
parent a790dd0398
commit c90ba890ca
4 changed files with 123 additions and 84 deletions

View File

@@ -727,6 +727,10 @@ define([
};
Nthen(function (waitFor) {
if (AppConfig.beforeLogin) {
AppConfig.beforeLogin(LocalStore.isLoggedIn(), waitFor());
}
}).nThen(function (waitFor) {
var cfg = {
query: onMessage, // TODO temporary, will be replaced by a webworker channel
userHash: LocalStore.getUserHash(),
@@ -763,6 +767,7 @@ define([
}
initFeedback(data.feedback);
initialized = true;
}));
}).nThen(function (waitFor) {
// Load the new pad when the hash has changed
@@ -829,6 +834,10 @@ define([
delete sessionStorage.migrateAnonDrive;
}));
}
}).nThen(function (waitFor) {
if (AppConfig.afterLogin) {
AppConfig.afterLogin(common, waitFor());
}
}).nThen(function () {
updateLocalVersion();
f(void 0, env);