diff --git a/gui/default/index.html b/gui/default/index.html index ba628417a..16a726bfb 100644 --- a/gui/default/index.html +++ b/gui/default/index.html @@ -437,6 +437,12 @@ + + diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 3626cb9c7..4f7de0ff6 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -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.