cmd/syncthing, gui: Settings dialog upgrades/reporting for candidates (fixes #4216) (#5457)

This adds booleans to the /system/version response to advice the GUI
whether the running version is a candidate release or not. (We could
parse it from the version string, but why duplicate the logic.)

Additionally the settings dialog locks down the upgrade and usage
reporting options on candidate releases. This matches the current
behavior, it just makes it obvious what actually *can* be chosen.
This commit is contained in:
Jakob Borg
2019-01-15 08:44:46 +01:00
committed by GitHub
parent b01edca420
commit f4bf18c1b4
4 changed files with 12 additions and 6 deletions

View File

@@ -124,6 +124,7 @@ angular.module('syncthing.core')
refreshThemes();
$http.get(urlbase + '/system/version').success(function (data) {
console.log("version", data);
if ($scope.version.version && $scope.version.version !== data.version) {
// We already have a version response, but it differs from
// the new one. Reload the full GUI in case it's changed.
@@ -131,7 +132,6 @@ angular.module('syncthing.core')
}
$scope.version = data;
$scope.version.isDevelopmentVersion = data.version.indexOf('-') > 0;
}).error($scope.emitHTTPError);
$http.get(urlbase + '/svc/report').success(function (data) {