mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Merge pull request #286 from glyptodon/logout-action
GUAC-1376: Add logout action to disconnect/error dialogs in client
This commit is contained in:
@@ -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.
|
||||
@@ -158,6 +171,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
||||
*/
|
||||
var RECONNECT_ACTION = {
|
||||
name : "CLIENT.ACTION_RECONNECT",
|
||||
className : "reconnect button",
|
||||
callback : function reconnectCallback() {
|
||||
$scope.client = guacClientManager.replaceManagedClient($routeParams.id, $routeParams.params);
|
||||
guacNotification.showStatus(false);
|
||||
@@ -447,9 +461,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;
|
||||
|
@@ -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');
|
||||
|
BIN
guacamole/src/main/webapp/images/circle-arrows.png
Normal file
BIN
guacamole/src/main/webapp/images/circle-arrows.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 888 B |
@@ -47,6 +47,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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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" : "Переподключиться",
|
||||
|
Reference in New Issue
Block a user