mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
Merge pull request #769 from AudriusButkevicius/fix
Disable autoupgrade if not supported (fixes #763)
This commit is contained in:
commit
c4d8d33a60
@ -1192,6 +1192,9 @@ func autoUpgrade() {
|
||||
}
|
||||
|
||||
rel, err := upgrade.LatestRelease(strings.Contains(Version, "-beta"))
|
||||
if err == upgrade.ErrUpgradeUnsupported {
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
// Don't complain too loudly here; we might simply not have
|
||||
// internet connectivity, or the upgrade server might be down.
|
||||
|
@ -100,7 +100,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
|
||||
$scope.reportPreview = false;
|
||||
$scope.folders = {};
|
||||
$scope.seenError = '';
|
||||
$scope.upgradeInfo = {};
|
||||
$scope.upgradeInfo = null;
|
||||
$scope.stats = {};
|
||||
|
||||
$http.get(urlbase + "/lang").success(function (langs) {
|
||||
@ -412,7 +412,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
|
||||
$http.get(urlbase + '/upgrade').success(function (data) {
|
||||
$scope.upgradeInfo = data;
|
||||
}).error(function () {
|
||||
$scope.upgradeInfo = {};
|
||||
$scope.upgradeInfo = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
<span class="navbar-brand"><img class="logo" src="img/logo-text-64.png" height="32" width="117"/></span>
|
||||
<p class="navbar-text hidden-xs">{{thisDeviceName()}}</p>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li ng-if="upgradeInfo.newer">
|
||||
<li ng-if="upgradeInfo && upgradeInfo.newer">
|
||||
<button type="button" class="btn navbar-btn btn-primary btn-sm" href="" ng-click="upgrade()">
|
||||
<span class="glyphicon glyphicon-chevron-up"></span> 
|
||||
<span translate translate-value-version="{{upgradeInfo.latest}}">Upgrade To {%version%}</span>
|
||||
@ -636,7 +636,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<label ng-if="upgradeInfo">
|
||||
<span translate>Automatic upgrades</span> <input id="AutoUpgradeEnabled" type="checkbox" ng-model="tmpOptions.AutoUpgradeEnabled">
|
||||
</label>
|
||||
</div>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user