mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUACAMOLE-724: Ensure connection parameters are updated when likely to be available (not just when group is attached).
This commit is contained in:
@@ -452,8 +452,14 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
// Update client state/behavior as visibility of the Guacamole menu changes
|
// Update client state/behavior as visibility of the Guacamole menu changes
|
||||||
$scope.$watch('menu.shown', function menuVisibilityChanged(menuShown, menuShownPreviousState) {
|
$scope.$watch('menu.shown', function menuVisibilityChanged(menuShown, menuShownPreviousState) {
|
||||||
|
|
||||||
|
// Update available connection parameters, if there is a focused
|
||||||
|
// client
|
||||||
|
if (menuShown)
|
||||||
|
$scope.menu.connectionParameters = $scope.focusedClient ?
|
||||||
|
ManagedClient.getArgumentModel($scope.focusedClient) : {};
|
||||||
|
|
||||||
// Send any argument value data once menu is hidden
|
// Send any argument value data once menu is hidden
|
||||||
if (!menuShown && menuShownPreviousState)
|
else if (menuShownPreviousState)
|
||||||
$scope.applyParameterChanges($scope.focusedClient);
|
$scope.applyParameterChanges($scope.focusedClient);
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -464,15 +470,14 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
var oldFocusedClient = $scope.focusedClient;
|
var oldFocusedClient = $scope.focusedClient;
|
||||||
$scope.focusedClient = newFocusedClient;
|
$scope.focusedClient = newFocusedClient;
|
||||||
|
|
||||||
|
// Ignore if focus is not actually changing
|
||||||
|
if (oldFocusedClient === newFocusedClient)
|
||||||
|
return;
|
||||||
|
|
||||||
// Apply any parameter changes when focus is changing
|
// Apply any parameter changes when focus is changing
|
||||||
if (oldFocusedClient)
|
if (oldFocusedClient)
|
||||||
$scope.applyParameterChanges(oldFocusedClient);
|
$scope.applyParameterChanges(oldFocusedClient);
|
||||||
|
|
||||||
// Update available connection parameters, if there is a focused
|
|
||||||
// client
|
|
||||||
$scope.menu.connectionParameters = newFocusedClient ?
|
|
||||||
ManagedClient.getArgumentModel(newFocusedClient) : {};
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update page icon when thumbnail changes
|
// Update page icon when thumbnail changes
|
||||||
|
Reference in New Issue
Block a user