gui: Prevent modifications when saving changes (fixes #9019) (#9063)

This commit is contained in:
tomasz1986
2023-08-31 17:11:03 +02:00
committed by GitHub
parent 3e5f0b1d0e
commit 95b3c26da7
4 changed files with 16 additions and 1 deletions
@@ -1513,13 +1513,17 @@ angular.module('syncthing.core')
};
$scope.saveConfig = function () {
$('#savingChanges').modal();
var cfg = JSON.stringify($scope.config);
var opts = {
headers: {
'Content-Type': 'application/json'
}
};
return $http.put(urlbase + '/config', cfg, opts).finally(refreshConfig).catch($scope.emitHTTPError);
return $http.put(urlbase + '/config', cfg, opts).finally(function () {
refreshConfig();
$('#savingChanges').modal("hide");
}).catch($scope.emitHTTPError);
};
$scope.urVersions = function () {