Merge pull request #4570 from warwickmm/ui_deprecated_options

Indicate deprecated options in UI
This commit is contained in:
Kenneth Skovhede
2021-08-11 10:36:31 +02:00
committed by GitHub
4 changed files with 16 additions and 6 deletions
@@ -505,6 +505,7 @@ ul.notification {
}
.longdescription {
margin-top: 10px;
margin-left: 190px;
clear: both;
font-style: italic;
@@ -1701,10 +1702,6 @@ body {
max-width: 100%;
box-sizing: border-box;
}
.longdescription {
margin-top: 10px;
}
}
.advanced-toggle {
@@ -60,12 +60,24 @@ backupApp.directive('advancedOptionsEditor', function() {
return optionmap[coreName(key)];
};
$scope.getDeprecationMessage = function(item) {
var item = $scope.getEntry(item);
if (item == null)
return null;
return item.DeprecationMessage;
};
$scope.getDisplayName = function(name) {
var item = $scope.getEntry(name);
if (item == null)
return coreName(name);
return item.Name + ': ' + item.ShortDescription;
name = item.Name;
if (item.Deprecated)
name += " (DEPRECATED)";
return name + ': ' + item.ShortDescription;
};
$scope.getInputType = function(item) {
File diff suppressed because one or more lines are too long
@@ -39,6 +39,7 @@
<a href ng-click="deleteItem(item)" title="{{'Remove option' | translate}}">x</a>
<div ng-if="getDeprecationMessage(item)" class="longdescription">DEPRECATED: {{getDeprecationMessage(item)}}</div>
<div class="longdescription">{{getLongDescription(item)}}<br>Default value: "{{getDefaultValue(item)}}"</div>
</li>