Update config (#5444)

* gui: Update config from remote after saving (fixes #5354)

* Refresh is async :(
This commit is contained in:
Audrius Butkevicius 2019-01-13 23:28:17 +00:00 committed by GitHub
parent 93ae9a1c2e
commit 801e9b57eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1211,13 +1211,14 @@ angular.module('syncthing.core')
} }
}; };
$http.post(urlbase + '/system/config', cfg, opts).success(function () { $http.post(urlbase + '/system/config', cfg, opts).success(function () {
$http.get(urlbase + '/system/config/insync').success(function (data) { refreshConfig();
$scope.configInSync = data.configInSync;
if (cb) { if (cb) {
cb(); cb();
} }
}).error(function (data, status, headers, config) {
refreshConfig();
$scope.emitHTTPError(data, status, headers, config);
}); });
}).error($scope.emitHTTPError);
}; };
$scope.urVersions = function () { $scope.urVersions = function () {