Skip to content

Commit

Permalink
WIP: Allow the extension to do its own rendering of fields outside th…
Browse files Browse the repository at this point in the history
…e menu if needed.
  • Loading branch information
jmuehlner committed Jan 16, 2024
1 parent 2a18c33 commit 6abf8bb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,17 +498,23 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
$scope.menu.connectionParameters = newFocusedClient ?
ManagedClient.getArgumentModel(newFocusedClient) : {};

// Re-broadcast the updated client
$scope.$broadcast('guacClientChanged'. newFocusedClient);

});

// Automatically update connection parameters that have been modified
// for the current focused client
$scope.$on('guacClientArgumentsUpdated', function focusedClientChanged(event, focusedClient) {

// Update available connection parameters, if the updated arguments are
// for the current focused client - otherwise ignore them
if ($scope.focusedClient && $scope.focusedClient === focusedClient)
// Ignore any updated arguments not for the current focused client
if ($scope.focusedClient && $scope.focusedClient === focusedClient) {
$scope.menu.connectionParameters = ManagedClient.getArgumentModel(focusedClient);

// Re-broadcast the updated arguments
$scope.$broadcast('guacClientArgumentsChanged'. focusedClient);
}

});

// Update page icon when thumbnail changes
Expand Down
14 changes: 7 additions & 7 deletions guacamole/src/main/frontend/src/app/client/styles/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
background: #EEE;
box-shadow: inset -1px 0 2px white, 1px 0 2px black;
z-index: 100;
-webkit-transition: left 0.125s;
-moz-transition: left 0.125s;
-ms-transition: left 0.125s;
-o-transition: left 0.125s;
transition: left 0.125s;
-webkit-transition: left 0.125s, opacity 0.125s;
-moz-transition: left 0.125s, opacity 0.125s;
-ms-transition: left 0.125s, opacity 0.125s;
-o-transition: left 0.125s, opacity 0.125s;
transition: left 0.125s, opacity 0.125s;
}

.menu-content {
Expand Down Expand Up @@ -137,10 +137,10 @@
.menu,
.menu.closed {
left: -480px;
visibility: hidden;
opacity: 0;
}

.menu.open {
left: 0px;
visibility: visible;
opacity: 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<!-- Menu -->
<div class="menu" ng-class="{open: menu.shown}" id="guac-menu">
<div class="menu-content" guac-touch-drag="menuDrag">
<div class="menu-content" ng-if="menu.shown" guac-touch-drag="menuDrag">

<!-- Stationary header -->
<div class="header">
Expand Down

0 comments on commit 6abf8bb

Please sign in to comment.