mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
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:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user