add new branding view

This commit is contained in:
Girish Ramakrishnan
2020-03-18 17:53:50 -07:00
parent 19e2df65ca
commit 0e3ae2b450
7 changed files with 85 additions and 65 deletions

View File

@@ -21,39 +21,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
}
};
$scope.branding = {
footer: {
busy: false,
content: '',
save: function () {
$scope.branding.footer.busy = true;
Client.setFooter($scope.branding.footer.content.trim(), function (error) {
if (error) return console.error('Failed to set footer.', error);
Client.refreshConfig(function () {
$scope.branding.footer.busy = false;
});
});
},
refresh: function () {
$scope.branding.footer.busy = true;
Client.getFooter(function (error, result) {
if (error) return console.error('Unable to fetch footer content.', error);
$scope.branding.footer.content = result;
$scope.branding.footer.busy = false;
});
}
},
refresh: function () {
$scope.branding.footer.refresh();
}
}
$scope.update = {
error: {}, // this is for the dialog
busy: false,
@@ -489,7 +456,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
getTimeZone();
$scope.update.checkStatus();
$scope.branding.refresh();
if ($scope.user.isAtLeastOwner) getSubscription();
});