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.get(urlbase + '/system/config/insync').success(function (data) {
$scope.configInSync = data.configInSync;
if (cb) {
cb();
}
});
}).error($scope.emitHTTPError);
refreshConfig();
if (cb) {
cb();
}
}).error(function (data, status, headers, config) {
refreshConfig();
$scope.emitHTTPError(data, status, headers, config);
});
};
$scope.urVersions = function () {