GUACAMOLE-742: Fade in overall login UI, not just login dialog.

Placing the fade animation on the login dialog (which also handles the
error shake-head animation) results in the dialog fading in each time
the login process changes state. It really should only fade when the
overall login interface initially appears.
This commit is contained in:
Michael Jumper
2019-04-27 16:56:47 -07:00
parent 583c82a45c
commit 81872f5718
2 changed files with 15 additions and 6 deletions

View File

@@ -66,6 +66,7 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
var Field = $injector.get('Field');
// Required services
var $rootScope = $injector.get('$rootScope');
var $route = $injector.get('$route');
var authenticationService = $injector.get('authenticationService');
var requestService = $injector.get('requestService');
@@ -160,9 +161,9 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
// Attempt login once existing session is destroyed
authenticationService.authenticate($scope.enteredValues)
// Clear and reload upon success
// Retry route upon success (entered values will be cleared only
// after route change has succeeded as this can take time)
.then(function loginSuccessful() {
$scope.enteredValues = {};
$route.reload();
})
@@ -199,6 +200,12 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
};
// Reset state after authentication and routing have succeeded
$rootScope.$on('$routeChangeSuccess', function routeChanged() {
$scope.enteredValues = {};
$scope.submitted = false;
});
}];
return directive;

View File

@@ -26,6 +26,12 @@
-webkit-animation-timing-function: linear;
}
.login-ui {
animation: fadein 0.125s linear;
-moz-animation: fadein 0.125s linear;
-webkit-animation: fadein 0.125s linear;
}
.login-ui div.login-dialog-middle {
width: 100%;
display: table-cell;
@@ -35,10 +41,6 @@
.login-ui div.login-dialog {
animation: fadein 0.125s linear;
-moz-animation: fadein 0.125s linear;
-webkit-animation: fadein 0.125s linear;
width: 100%;
max-width: 3in;
text-align: left;