GUI: Added "Pause All Folders" and "Resume All Folders buttons
As per scienmind's post (#3964) i though it was a good idea and wanted such a button. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3973 LGTM: AudriusButkevicius, calmh
This commit is contained in:
@@ -1661,6 +1661,29 @@ angular.module('syncthing.core')
|
||||
$http.post(urlbase + "/db/scan?folder=" + encodeURIComponent(folder));
|
||||
};
|
||||
|
||||
$scope.setAllFoldersPause = function(pause) {
|
||||
var folderListCache = $scope.folderList();
|
||||
|
||||
for (var i = 0; i < folderListCache.length; i++) {
|
||||
folderListCache[i].paused = pause;
|
||||
}
|
||||
|
||||
$scope.config.folders = folderList(folderListCache);
|
||||
$scope.saveConfig();
|
||||
};
|
||||
|
||||
$scope.isAtleastOneFolderPausedStateSetTo = function(pause) {
|
||||
var folderListCache = $scope.folderList();
|
||||
|
||||
for (var i = 0; i < folderListCache.length; i++) {
|
||||
if (folderListCache[i].paused == pause) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.bumpFile = function (folder, file) {
|
||||
var url = urlbase + "/db/prio?folder=" + encodeURIComponent(folder) + "&file=" + encodeURIComponent(file);
|
||||
// In order to get the right view of data in the response.
|
||||
|
||||
Reference in New Issue
Block a user