From e5a127647be51de45dc86db18c06e7a0ffd390a0 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 4 Jul 2021 19:04:04 -0700 Subject: [PATCH] GUACAMOLE-724: Restore sorting client panel by last used timestamp. Sorting by last used (rather than relying on internal sorting) ensures that the DOM is only modified as necessary and that CSS animations only affect client groups that are newly visible in the panel. --- .../src/app/client/controllers/clientController.js | 1 + .../src/app/client/templates/guacClientPanel.html | 2 +- .../src/app/client/types/ManagedClientGroup.js | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js index 66e4d5e31..2221029b5 100644 --- a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js +++ b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js @@ -307,6 +307,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams if (managedClientGroup) { $scope.clientGroup = managedClientGroup; $scope.clientGroup.attached = true; + $scope.clientGroup.lastUsed = new Date().getTime(); } }; diff --git a/guacamole/src/main/frontend/src/app/client/templates/guacClientPanel.html b/guacamole/src/main/frontend/src/app/client/templates/guacClientPanel.html index e741e4cb9..0705969ac 100644 --- a/guacamole/src/main/frontend/src/app/client/templates/guacClientPanel.html +++ b/guacamole/src/main/frontend/src/app/client/templates/guacClientPanel.html @@ -6,7 +6,7 @@