Make the user confirm the post install message on first time clicking the app icon

This commit is contained in:
Johannes Zellner
2018-06-14 15:46:55 +02:00
parent 461fb0144e
commit 37c8b2b57f
5 changed files with 73 additions and 3 deletions

View File

@@ -313,6 +313,30 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
message: ''
};
$scope.appPostInstallConfirm = {
app: {},
message: '',
confirmed: false,
show: function (app) {
$scope.reset();
$scope.appPostInstallConfirm.app = app;
$scope.appPostInstallConfirm.message = app.manifest.postInstallMessage;
$('#appPostInstallConfirmModal').modal('show');
return false; // prevent propagation and default
},
submit: function () {
$scope.appPostInstallConfirm.app.pendingPostInstallConfirmation = false;
delete localStorage['confirmPostInstall_' + $scope.appPostInstallConfirm.app.id];
$('#appPostInstallConfirmModal').modal('hide');
}
};
$scope.appError = {
app: {}
};
@@ -333,6 +357,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$('#appUpdateModal').modal('hide');
$('#appInfoModal').modal('hide');
$('#appUninstallModal').modal('hide');
$('#appPostInstallConfirmModal').modal('hide');
// reset configure dialog
$scope.appConfigure.error = {};
@@ -383,6 +408,11 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appRestore.portBindingsInfo = {};
$scope.appRestore.portBindingsEnabled = {};
$scope.appRestore.action = 'restore';
// post install confirmation dialog
$scope.appPostInstallConfirm.app = {};
$scope.appPostInstallConfirm.message = '';
$scope.appPostInstallConfirm.confirmed = false;
};
$scope.readCertificate = function (event) {