mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
This commit is contained in:
parent
d9664a946d
commit
5224f07ac8
@ -788,6 +788,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span class="pull-right">
|
<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()">
|
<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>
|
<span class="fas fa-fw fa-info-circle"></span> <span translate>Recent Changes</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -1588,6 +1588,24 @@ angular.module('syncthing.core')
|
|||||||
return devices;
|
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 () {
|
$scope.errorList = function () {
|
||||||
if (!$scope.errors) {
|
if (!$scope.errors) {
|
||||||
return [];
|
return [];
|
||||||
|
Loading…
Reference in New Issue
Block a user