From 42f360a02b44df332af049a2dde6aecc36085dd5 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 29 Dec 2014 21:24:37 -0800 Subject: [PATCH] GUAC-963: Add back and disconnect buttons. --- .../app/client/controllers/clientController.js | 14 ++++++++++++++ .../src/main/webapp/app/client/styles/menu.css | 12 ++++++------ .../main/webapp/app/client/templates/client.html | 15 +++++++++++---- guacamole/src/main/webapp/translations/en_US.json | 8 +++++--- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 25990a0b6..3330afeb3 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -497,6 +497,20 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams return $scope.client.clientProperties.minZoom >= 1; }; + /** + * Immediately disconnects the currently-connected client, if any. + */ + $scope.disconnect = function disconnect() { + + // Disconnect if client is available + if ($scope.client) + $scope.client.client.disconnect(); + + // Hide menu + $scope.menuShown = false; + + }; + /** * Returns a progress object, as required by $scope.addNotification(), which * contains the given number of bytes as an appropriate combination of diff --git a/guacamole/src/main/webapp/app/client/styles/menu.css b/guacamole/src/main/webapp/app/client/styles/menu.css index b1d6130e5..26acfbbea 100644 --- a/guacamole/src/main/webapp/app/client/styles/menu.css +++ b/guacamole/src/main/webapp/app/client/styles/menu.css @@ -37,8 +37,12 @@ transition: left 0.125s, opacity 0.125s; } +#menu h3 { + margin: 1em; +} + #menu .content { - padding: 1em; + margin: 1em; } #menu .content > * { @@ -65,6 +69,7 @@ border-radius: 0.25em; white-space: pre; display: block; + font-size: 1em; } #menu #mouse-settings .choice { @@ -94,11 +99,6 @@ margin: 1em auto; } -#menu h2 { - padding: 0.25em 0.5em; - font-size: 1em; -} - #menu #keyboard-settings .figure { float: right; max-width: 30%; diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html index 401970d00..7a794d22a 100644 --- a/guacamole/src/main/webapp/app/client/templates/client.html +++ b/guacamole/src/main/webapp/app/client/templates/client.html @@ -54,13 +54,20 @@