From 835cb21315eb3eb3f63795c2a603e796f723acda Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 2 Nov 2015 13:15:37 -0800 Subject: [PATCH 1/2] GUAC-1376: Add logout action to disconnect/error notification in client. --- .../app/client/controllers/clientController.js | 17 +++++++++++++++-- guacamole/src/main/webapp/translations/de.json | 1 + guacamole/src/main/webapp/translations/en.json | 1 + guacamole/src/main/webapp/translations/fr.json | 1 + guacamole/src/main/webapp/translations/it.json | 1 + guacamole/src/main/webapp/translations/nl.json | 1 + guacamole/src/main/webapp/translations/ru.json | 1 + 7 files changed, 21 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 9e5d77dce..12cf02743 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -130,6 +130,19 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams 0x0308: true }; + /** + * Action which logs out from Guacamole entirely. + */ + var LOGOUT_ACTION = { + name : "CLIENT.ACTION_LOGOUT", + className : "logout button", + callback : function logoutCallback() { + authenticationService.logout()['finally'](function logoutComplete() { + $location.url('/'); + }); + } + }; + /** * Action which returns the user to the home screen. If the home page has * not yet been determined, this will be null. @@ -447,9 +460,9 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams // Build array of available actions var actions; if (NAVIGATE_HOME_ACTION) - actions = [ NAVIGATE_HOME_ACTION, RECONNECT_ACTION ]; + actions = [ NAVIGATE_HOME_ACTION, RECONNECT_ACTION, LOGOUT_ACTION ]; else - actions = [ RECONNECT_ACTION ]; + actions = [ RECONNECT_ACTION, LOGOUT_ACTION ]; // Get any associated status code var status = $scope.client.clientState.statusCode; diff --git a/guacamole/src/main/webapp/translations/de.json b/guacamole/src/main/webapp/translations/de.json index 674ed646c..ded4bd6e8 100644 --- a/guacamole/src/main/webapp/translations/de.json +++ b/guacamole/src/main/webapp/translations/de.json @@ -45,6 +45,7 @@ "ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "Entferne abgeschlossene Übertragungen", "ACTION_DISCONNECT" : "Trennen", + "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_NAVIGATE_BACK" : "@:APP.ACTION_NAVIGATE_BACK", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_RECONNECT" : "Neu Verbinden", diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json index ceaa8899b..59a991d2d 100644 --- a/guacamole/src/main/webapp/translations/en.json +++ b/guacamole/src/main/webapp/translations/en.json @@ -47,6 +47,7 @@ "ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "Clear", "ACTION_DISCONNECT" : "Disconnect", + "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_NAVIGATE_BACK" : "@:APP.ACTION_NAVIGATE_BACK", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_RECONNECT" : "Reconnect", diff --git a/guacamole/src/main/webapp/translations/fr.json b/guacamole/src/main/webapp/translations/fr.json index f14336d65..6839339b2 100644 --- a/guacamole/src/main/webapp/translations/fr.json +++ b/guacamole/src/main/webapp/translations/fr.json @@ -45,6 +45,7 @@ "ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "Vider", "ACTION_DISCONNECT" : "Déconnecter", + "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_NAVIGATE_BACK" : "@:APP.ACTION_NAVIGATE_BACK", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_RECONNECT" : "Reconnecter", diff --git a/guacamole/src/main/webapp/translations/it.json b/guacamole/src/main/webapp/translations/it.json index 4dff9f94a..40282016e 100644 --- a/guacamole/src/main/webapp/translations/it.json +++ b/guacamole/src/main/webapp/translations/it.json @@ -45,6 +45,7 @@ "ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "Pulisci i trasferimenti completati", "ACTION_DISCONNECT" : "Disconnetti", + "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_NAVIGATE_BACK" : "@:APP.ACTION_NAVIGATE_BACK", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_RECONNECT" : "Riconnetti", diff --git a/guacamole/src/main/webapp/translations/nl.json b/guacamole/src/main/webapp/translations/nl.json index 255d08fdd..1a16b1482 100644 --- a/guacamole/src/main/webapp/translations/nl.json +++ b/guacamole/src/main/webapp/translations/nl.json @@ -45,6 +45,7 @@ "ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "Wis lijst", "ACTION_DISCONNECT" : "Verbreek Verbinding", + "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_NAVIGATE_BACK" : "@:APP.ACTION_NAVIGATE_BACK", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_RECONNECT" : "Verbind Opnieuw", diff --git a/guacamole/src/main/webapp/translations/ru.json b/guacamole/src/main/webapp/translations/ru.json index 22883b910..ecef5f39a 100644 --- a/guacamole/src/main/webapp/translations/ru.json +++ b/guacamole/src/main/webapp/translations/ru.json @@ -44,6 +44,7 @@ "ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "Очистить", "ACTION_DISCONNECT" : "Отключиться", + "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_NAVIGATE_BACK" : "@:APP.ACTION_NAVIGATE_BACK", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_RECONNECT" : "Переподключиться", From f708e4b20400f85aa646fb44a264a3b200e291af Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 2 Nov 2015 13:35:09 -0800 Subject: [PATCH 2/2] GUAC-1376: Add reconnect button style. --- .../client/controllers/clientController.js | 5 ++- .../main/webapp/app/index/styles/buttons.css | 37 ++++++++---------- .../src/main/webapp/images/circle-arrows.png | Bin 0 -> 888 bytes 3 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 guacamole/src/main/webapp/images/circle-arrows.png diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 12cf02743..572724f41 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -170,8 +170,9 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams * Action which replaces the current client with a newly-connected client. */ var RECONNECT_ACTION = { - name : "CLIENT.ACTION_RECONNECT", - callback : function reconnectCallback() { + name : "CLIENT.ACTION_RECONNECT", + className : "reconnect button", + callback : function reconnectCallback() { $scope.client = guacClientManager.replaceManagedClient($routeParams.id, $routeParams.params); guacNotification.showStatus(false); } diff --git a/guacamole/src/main/webapp/app/index/styles/buttons.css b/guacamole/src/main/webapp/app/index/styles/buttons.css index ec257abfc..280cd47d3 100644 --- a/guacamole/src/main/webapp/app/index/styles/buttons.css +++ b/guacamole/src/main/webapp/app/index/styles/buttons.css @@ -79,30 +79,22 @@ input[type="submit"]:disabled, button:disabled, button.danger:disabled { opacity: 0.75; } -.button.logout, -button.logout, -.button.manage, -button.manage, -.button.back, -button.back, -.button.home, -button.home, -.button.change-password, -button.change-password { +.button.logout, button.logout, +.button.reconnect, button.reconnect, +.button.manage, button.manage, +.button.back, button.back, +.button.home, button.home, +.button.change-password, button.change-password { position: relative; padding-left: 1.8em; } -.button.logout::before, -button.logout::before, -.button.manage::before, -button.manage::before, -.button.back::before, -button.back::before, -.button.home::before, -button.home::before, -.button.change-password::before, -button.change-password::before { +.button.logout::before, button.logout::before, +.button.reconnect::before, button.reconnect::before, +.button.manage::before, button.manage::before, +.button.back::before, button.back::before, +.button.home::before, button.home::before, +.button.change-password::before, button.change-password::before { content: ' '; position: absolute; left: 0; @@ -119,6 +111,11 @@ button.logout::before { background-image: url('images/action-icons/guac-logout.png'); } +.button.reconnect::before, +button.reconnect::before { + background-image: url('images/circle-arrows.png'); +} + .button.manage::before, button.manage::before { background-image: url('images/action-icons/guac-config.png'); diff --git a/guacamole/src/main/webapp/images/circle-arrows.png b/guacamole/src/main/webapp/images/circle-arrows.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c33a1e9d8c04411b034ef76fc3d031f354aba4 GIT binary patch literal 888 zcmV-;1Bd*HP)#PlEYx2Iie}&;OlwKCeg&F~ktV7Q+Zv zk$5>M>Ee(inHGWt31@;SF`fMZ@?W z9x#tJ^idaS^H=$f9$u0aDdXFDLO7V>awN<<=p!JeIS-js$a<+?s~x225qPRN&`p`Cd`8Am8^g=d7DgXFTATQHm{T8nodJ(Ea24J!PFh0#2sa9WhLf zhWDH%d2viH1~PE548SjnGy}LpNgz)@6Hd?xG-~VRFrgrj9bP(CqSZA?;3hLl5A3#K z#Grsd)7qG9%alU}-AeP`s5EMmRIH&th`@ra(;o3OFyu$TWBbTSBG=bV5~Eu(_mV=3 zFDC}ADYTLsg@LY}MS86X_pyYF%!rf7rPZ3?R{-W{*X-UAV>-4PG?TQDWIq9qU+N6e zK)k&K7J>>$KQ$P3nU4z^CjOzD3VR47n>La`3hW?|t~5SN8#^?+L1lOZvXwi|0qt{| zfcKo%Cy=M~K!@fj#mxG4BNrKZs)Z&I;M6$dklzwNjgtiH$|b9NU62>7jT00FG-3Fm z;RQ;4%XI+*ij_Na!_aH;Ie$H>bw0r*K2s$k!dVs-;n+fosct!M6(8@hUJRtI6<+F< zMQI8bm8AL=ucI{cQ5ie0NZibNeoM@jYp;BfahZ~2NtYv%Y9iGm=Z%@o6{c$}g?&Ns znq85ojaACMe`7of?R*^ys+Bu5#<&vc9#KoLMdNeakID*09JRPv32A(YJ9?#8|Ee}y zYNSj~%6`AU=cGrv