gui: Hide download progress legend when download progress is disabled

This commit is contained in:
Jakob Borg 2023-03-20 15:23:39 +01:00
parent 5caf9bfc18
commit bc371eacf6
2 changed files with 17 additions and 8 deletions

View File

@ -2877,6 +2877,13 @@ angular.module('syncthing.core')
}); });
}; };
$scope.downloadProgressEnabled = function() {
return $scope.config.options &&
$scope.config.options.progressUpdateIntervalS > 0 &&
$scope.folders[$scope.neededFolder] &&
$scope.folders[$scope.neededFolder].type != 'receiveencrypted';
}
$scope.showFailed = function (folder) { $scope.showFailed = function (folder) {
$scope.failed.folder = folder; $scope.failed.folder = folder;
$scope.failed = $scope.refreshFailed(1, 10); $scope.failed = $scope.refreshFailed(1, 10);

View File

@ -2,6 +2,7 @@
<div class="modal-body"> <div class="modal-body">
<div id="download-legend" ng-if="downloadProgressEnabled()">
<div class="progress"> <div class="progress">
<div class="progress-bar progress-bar-success" style="width: 20%"><span translate class="show">Reused</span></div> <div class="progress-bar progress-bar-success" style="width: 20%"><span translate class="show">Reused</span></div>
<div class="progress-bar" style="width: 20%"><span translate class="show">Copied from original</span></div> <div class="progress-bar" style="width: 20%"><span translate class="show">Copied from original</span></div>
@ -11,6 +12,7 @@
</div> </div>
<hr /> <hr />
</div>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed">