Fix email display logic again
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p ng-show="!appConfigure.app.manifest.addons.email" class="text-danger">
|
||||
<p ng-show="!mailConfig.enabled && appConfigure.app.manifest.addons.email" class="text-danger">
|
||||
This app requires <a href="#/settings">Cloudron Email</a> to be enabled.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
$scope.groups = [];
|
||||
$scope.users = [];
|
||||
$scope.restartAppBusy = false;
|
||||
$scope.mailConfig = {};
|
||||
|
||||
$scope.appConfigure = {
|
||||
busy: false,
|
||||
@@ -559,6 +560,14 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
});
|
||||
}
|
||||
|
||||
function getMailConfig() {
|
||||
Client.getMailConfig(function (error, mailConfig) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.mailConfig = mailConfig;
|
||||
});
|
||||
}
|
||||
|
||||
Client.onReady(function () {
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return console.error(error);
|
||||
@@ -567,6 +576,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
fetchUsers();
|
||||
fetchGroups();
|
||||
fetchDnsConfig();
|
||||
getMailConfig();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p ng-show="!appInstall.app.manifest.addons.email" class="text-danger">
|
||||
<p ng-show="!mailConfig.enabled && appInstall.app.manifest.addons.email" class="text-danger">
|
||||
This app requires <a href="#/settings">Cloudron Email</a> to be enabled.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
$scope.searchString = '';
|
||||
$scope.validAppstoreAccount = false;
|
||||
$scope.appstoreConfig = null;
|
||||
$scope.mailConfig = {};
|
||||
|
||||
$scope.showRequestUpgrade = function () {
|
||||
// wait for dialog to be fully closed to avoid modal behavior breakage when moving to a different view already
|
||||
@@ -542,6 +543,14 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
});
|
||||
}
|
||||
|
||||
function getMailConfig() {
|
||||
Client.getMailConfig(function (error, mailConfig) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.mailConfig = mailConfig;
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
$scope.ready = false;
|
||||
|
||||
@@ -560,6 +569,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
fetchUsers();
|
||||
fetchGroups();
|
||||
fetchDnsConfig();
|
||||
getMailConfig();
|
||||
|
||||
fetchAppstoreConfig(function (error) {
|
||||
if (error) console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user