add ability to set cloudron language for admins

This commit is contained in:
Johannes Zellner
2020-11-18 00:28:10 +01:00
parent fd8077d9f5
commit 15b9ce0ee3
4 changed files with 38 additions and 25 deletions

View File

@@ -122,24 +122,28 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
Client.refreshConfig(function (error) {
if (error) return Client.initError(error, init);
Client.refreshInstalledApps(function (error) {
Client.refreshAvailableLanguages(function (error) {
if (error) return Client.initError(error, init);
// now mark the Client to be ready
Client.setReady();
Client.refreshInstalledApps(function (error) {
if (error) return Client.initError(error, init);
$scope.config = Client.getConfig();
// now mark the Client to be ready
Client.setReady();
$scope.initialized = true;
$scope.config = Client.getConfig();
if (Client.getConfig().mandatory2FA && !Client.getUserInfo().twoFactorAuthenticationEnabled) {
$location.path('/profile').search({ setup2fa: true });
return;
}
$scope.initialized = true;
refreshNotifications(true);
if (Client.getConfig().mandatory2FA && !Client.getUserInfo().twoFactorAuthenticationEnabled) {
$location.path('/profile').search({ setup2fa: true });
return;
}
$scope.updateSubscriptionStatus();
refreshNotifications(true);
$scope.updateSubscriptionStatus();
});
});
});
});