mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-301: Clear login interface if login was either successful or implicitly not required.
This commit is contained in:
@@ -165,19 +165,18 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
|
||||
$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;
|
||||
});
|
||||
|
||||
// Update title and CSS class upon navigation
|
||||
$scope.$on('$routeChangeSuccess', function(event, current, previous) {
|
||||
|
||||
// If the current route is available
|
||||
if (current.$$route) {
|
||||
|
||||
// Clear login screen if route change was successful (and thus
|
||||
// login was either successful or not required)
|
||||
$scope.loginHelpText = null;
|
||||
$scope.acceptedCredentials = null;
|
||||
$scope.expectedCredentials = null;
|
||||
|
||||
// Set title
|
||||
var title = current.$$route.title;
|
||||
if (title)
|
||||
|
Reference in New Issue
Block a user