mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1176: Provide user with help text during login. Style continuation dialog differently. Add continue button.
This commit is contained in:
@@ -36,6 +36,14 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
|
||||
*/
|
||||
$scope.guacNotification = guacNotification;
|
||||
|
||||
/**
|
||||
* The message to display to the user as instructions for the login
|
||||
* process.
|
||||
*
|
||||
* @type String
|
||||
*/
|
||||
$scope.loginHelpText = null;
|
||||
|
||||
/**
|
||||
* The credentials that the authentication service is has already accepted,
|
||||
* pending additional credentials, if any. If the user is logged in, or no
|
||||
@@ -120,23 +128,26 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
|
||||
};
|
||||
|
||||
// Display login screen if a whole new set of credentials is needed
|
||||
$scope.$on('guacInvalidCredentials', function loginInvalid(event, parameters, expected) {
|
||||
$scope.$on('guacInvalidCredentials', function loginInvalid(event, parameters, error) {
|
||||
$scope.page.title = 'APP.NAME';
|
||||
$scope.page.bodyClassName = '';
|
||||
$scope.loginHelpText = null;
|
||||
$scope.acceptedCredentials = {};
|
||||
$scope.expectedCredentials = expected;
|
||||
$scope.expectedCredentials = error.expected;
|
||||
});
|
||||
|
||||
// Prompt for remaining credentials if provided credentials were not enough
|
||||
$scope.$on('guacInsufficientCredentials', function loginInsufficient(event, parameters, expected) {
|
||||
$scope.$on('guacInsufficientCredentials', function loginInsufficient(event, parameters, error) {
|
||||
$scope.page.title = 'APP.NAME';
|
||||
$scope.page.bodyClassName = '';
|
||||
$scope.loginHelpText = error.message;
|
||||
$scope.acceptedCredentials = parameters;
|
||||
$scope.expectedCredentials = expected;
|
||||
$scope.expectedCredentials = error.expected;
|
||||
});
|
||||
|
||||
// Clear login screen if login was successful
|
||||
$scope.$on('guacLogin', function loginSuccessful() {
|
||||
$scope.loginHelpText = null;
|
||||
$scope.acceptedCredentials = null;
|
||||
$scope.expectedCredentials = null;
|
||||
});
|
||||
|
Reference in New Issue
Block a user