Add postinstall message to app view

This commit is contained in:
Johannes Zellner
2019-09-19 22:49:21 +02:00
parent 7825d10f18
commit ab5edbdd41
2 changed files with 62 additions and 12 deletions

View File

@@ -687,6 +687,29 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
}
}
$scope.postInstallConfirm = {
message: '',
confirmed: false,
show: function () {
$scope.postInstallConfirm.message = $scope.app.manifest.postInstallMessage;
$scope.postInstallConfirm.confirmed = false;
$('#postInstallConfirmModal').modal('show');
return false; // prevent propagation and default
},
submit: function () {
if (!$scope.postInstallConfirm.confirmed) return;
$scope.app.pendingPostInstallConfirmation = false;
delete localStorage['confirmPostInstall_' + $scope.app.id];
$('#postInstallConfirmModal').modal('hide');
}
};
function fetchUsers(callback) {
Client.getUsers(function (error, users) {
if (error) return callback(error);