mirror of
https://github.com/octoleo/syncthing.git
synced 2024-09-11 01:19:00 +00:00
This commit is contained in:
parent
d9664a946d
commit
5224f07ac8
@ -788,6 +788,12 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span class="pull-right">
|
||||
<button type="button" class="btn btn-sm btn-default" ng-click="setAllDevicesPause(true)" ng-if="isAtleastOneDevicePausedStateSetTo(false)">
|
||||
<span class="fas fa-pause"></span> <span translate>Pause All</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-default" ng-click="setAllDevicesPause(false)" ng-if="isAtleastOneDevicePausedStateSetTo(true)">
|
||||
<span class="fas fa-play"></span> <span translate>Resume All</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-default" ng-click="globalChanges()">
|
||||
<span class="fas fa-fw fa-info-circle"></span> <span translate>Recent Changes</span>
|
||||
</button>
|
||||
|
@ -1588,6 +1588,24 @@ angular.module('syncthing.core')
|
||||
return devices;
|
||||
};
|
||||
|
||||
$scope.setAllDevicesPause = function (pause) {
|
||||
$scope.devices.forEach(function (cfg) {
|
||||
cfg.paused = pause;
|
||||
});
|
||||
$scope.config.devices = $scope.devices;
|
||||
$scope.saveConfig();
|
||||
}
|
||||
|
||||
$scope.isAtleastOneDevicePausedStateSetTo = function (pause) {
|
||||
for (var i = 0; i < $scope.devices.length; i++) {
|
||||
if ($scope.devices[i].paused == pause) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
$scope.errorList = function () {
|
||||
if (!$scope.errors) {
|
||||
return [];
|
||||
|
Loading…
Reference in New Issue
Block a user