Add checkbox to skip backup for app update

This commit is contained in:
Girish Ramakrishnan
2019-09-26 20:10:25 -07:00
parent a905e32cde
commit ee05e109c8
3 changed files with 9 additions and 3 deletions

View File

@@ -180,6 +180,10 @@
<div ng-bind-html="config.update.apps[app.id].manifest.changelog | markdown2html"></div>
</div>
<div class="modal-footer">
<label class="checkbox-inline pull-left">
<input type="checkbox" ng-model="updates.skipBackup"><b>Skip backup</b>
</label>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="updates.confirmUpdate()" ng-disabled="updates.busyUpdate"><i class="fa fa-circle-notch fa-spin" ng-show="updates.busyUpdate"></i> Update</button>
</div>

View File

@@ -497,6 +497,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
busy: false,
busyCheck: false,
busyUpdate: false,
skipBackup: false,
enableAutomaticUpdate: false,
@@ -537,7 +538,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
confirmUpdate: function () {
$scope.updates.busyUpdate = true;
Client.updateApp($scope.app.id, $scope.config.update.apps[$scope.app.id].manifest, function (error) {
Client.updateApp($scope.app.id, $scope.config.update.apps[$scope.app.id].manifest, { skipBackup: $scope.updates.skipBackup }, function (error) {
$scope.updates.busyUpdate = false;
if (error) return Client.error(error);