diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-03-20 15:23:39 +0100 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2023-03-20 15:34:18 +0100 |
commit | bc371eacf6ec9e76079e128d1bca594aa7b44be8 (patch) | |
tree | c6e8d579974b92a004f30e8fef56162ebd4c21a6 | |
parent | 5caf9bfc18f813730dcec93f1e5b2b7e0aa24970 (diff) |
gui: Hide download progress legend when download progress is disabled
-rwxr-xr-x | gui/default/syncthing/core/syncthingController.js | 7 | ||||
-rw-r--r-- | gui/default/syncthing/transfer/neededFilesModalView.html | 18 |
2 files changed, 17 insertions, 8 deletions
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 6a39f31580..8ef99bf31b 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -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.failed.folder = folder; $scope.failed = $scope.refreshFailed(1, 10); diff --git a/gui/default/syncthing/transfer/neededFilesModalView.html b/gui/default/syncthing/transfer/neededFilesModalView.html index bc8f689c33..77afe5367a 100644 --- a/gui/default/syncthing/transfer/neededFilesModalView.html +++ b/gui/default/syncthing/transfer/neededFilesModalView.html @@ -2,15 +2,17 @@ <div class="modal-body"> - <div class="progress"> - <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 progress-bar-info" style="width: 20%"><span translate class="show">Copied from elsewhere</span></div> - <div class="progress-bar progress-bar-warning" style="width: 20%"><span translate class="show">Downloaded</span></div> - <div class="progress-bar progress-bar-danger" style="width: 20%"><span translate class="show">Downloading</span></div> - </div> + <div id="download-legend" ng-if="downloadProgressEnabled()"> + <div class="progress"> + <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 progress-bar-info" style="width: 20%"><span translate class="show">Copied from elsewhere</span></div> + <div class="progress-bar progress-bar-warning" style="width: 20%"><span translate class="show">Downloaded</span></div> + <div class="progress-bar progress-bar-danger" style="width: 20%"><span translate class="show">Downloading</span></div> + </div> - <hr /> + <hr /> + </div> <table class="table table-striped table-condensed"> |