mirror of
https://github.com/portainer/portainer.git
synced 2025-07-31 19:35:21 +02:00
feat(about): add a new about view as well as a support header
This commit is contained in:
parent
3362ba0c8c
commit
688b15fb4b
12 changed files with 203 additions and 54 deletions
|
@ -9,6 +9,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
$scope.formValues = {
|
||||
customLogo: false,
|
||||
customTemplates: false,
|
||||
donationHeader: true,
|
||||
externalContributions: false,
|
||||
restrictBindMounts: false,
|
||||
restrictPrivilegedMode: false,
|
||||
|
@ -45,6 +46,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
settings.TemplatesURL = DEFAULT_TEMPLATES_URL;
|
||||
}
|
||||
|
||||
settings.DisplayDonationHeader = !$scope.formValues.donationHeader;
|
||||
settings.DisplayExternalContributors = !$scope.formValues.externalContributions;
|
||||
settings.AllowBindMountsForRegularUsers = !$scope.formValues.restrictBindMounts;
|
||||
settings.AllowPrivilegedModeForRegularUsers = !$scope.formValues.restrictPrivilegedMode;
|
||||
|
@ -63,6 +65,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
.then(function success(data) {
|
||||
Notifications.success('Settings updated');
|
||||
StateManager.updateLogo(settings.LogoURL);
|
||||
StateManager.updateDonationHeader(settings.DisplayDonationHeader);
|
||||
StateManager.updateExternalContributions(settings.DisplayExternalContributors);
|
||||
if (resetForm) {
|
||||
resetFormValues();
|
||||
|
@ -87,6 +90,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
if (settings.TemplatesURL !== DEFAULT_TEMPLATES_URL) {
|
||||
$scope.formValues.customTemplates = true;
|
||||
}
|
||||
$scope.formValues.donationHeader = !settings.DisplayDonationHeader;
|
||||
$scope.formValues.externalContributions = !settings.DisplayExternalContributors;
|
||||
$scope.formValues.restrictBindMounts = !settings.AllowBindMountsForRegularUsers;
|
||||
$scope.formValues.restrictPrivilegedMode = !settings.AllowPrivilegedModeForRegularUsers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue