mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUAC-1176: Set CSS "continuation" class on login interface if login is continuing.
This commit is contained in:
@@ -86,7 +86,7 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether an error occurred during login.
|
* Whether an error occurred during login.
|
||||||
*
|
*
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
*/
|
*/
|
||||||
$scope.loginError = false;
|
$scope.loginError = false;
|
||||||
@@ -105,6 +105,22 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
|
|||||||
*/
|
*/
|
||||||
$scope.remainingFields = [];
|
$scope.remainingFields = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether a previous login attempt is continuing.
|
||||||
|
*
|
||||||
|
* @return {Boolean}
|
||||||
|
* true if a previous login attempt is continuing, false otherwise.
|
||||||
|
*/
|
||||||
|
$scope.isContinuation = function isContinuation() {
|
||||||
|
|
||||||
|
// The login is continuing if any parameter values are provided
|
||||||
|
for (var name in $scope.values)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
$scope.$watch('values', function resetEnteredValues(values) {
|
$scope.$watch('values', function resetEnteredValues(values) {
|
||||||
angular.extend($scope.enteredValues, values || {});
|
angular.extend($scope.enteredValues, values || {});
|
||||||
});
|
});
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="login-ui" ng-class="{error: loginError}" >
|
<div class="login-ui" ng-class="{error: loginError, continuation: isContinuation(), initial: !isContinuation()}" >
|
||||||
<!--
|
<!--
|
||||||
Copyright 2014 Glyptodon LLC.
|
Copyright 2014 Glyptodon LLC.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user