all: Allow dismissing pending devices / folders without ignoring (fixes #7700) (#7712)

This commit is contained in:
André Colomb
2021-06-07 10:29:24 +02:00
committed by GitHub
parent ea0a408849
commit 45edad867c
7 changed files with 294 additions and 23 deletions
@@ -1749,6 +1749,10 @@ angular.module('syncthing.core')
$scope.saveConfig();
};
$scope.dismissPendingDevice = function (deviceID) {
$http.delete(urlbase + '/cluster/pending/devices?device=' + encodeURIComponent(deviceID));
};
$scope.unignoreDeviceFromTemporaryConfig = function (ignoredDevice) {
$scope.tmpRemoteIgnoredDevices = $scope.tmpRemoteIgnoredDevices.filter(function (existingIgnoredDevice) {
return ignoredDevice.deviceID !== existingIgnoredDevice.deviceID;
@@ -2220,6 +2224,11 @@ angular.module('syncthing.core')
}
};
$scope.dismissPendingFolder = function (folderID, deviceID) {
$http.delete(urlbase + '/cluster/pending/folders?folder=' + encodeURIComponent(folderID)
+ '&device=' + encodeURIComponent(deviceID));
};
$scope.sharesFolder = function (folderCfg) {
var names = [];
folderCfg.devices.forEach(function (device) {