From fbe177231ddc419d132b832afd930167b99a8910 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 16 Apr 2015 22:18:34 -0700 Subject: [PATCH] GUAC-1053: Only display one link for settings within the user menu. --- .../app/navigation/services/userPageService.js | 10 ++++++++-- .../main/webapp/app/navigation/styles/user-menu.css | 12 +++--------- guacamole/src/main/webapp/translations/en_US.json | 2 ++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/guacamole/src/main/webapp/app/navigation/services/userPageService.js b/guacamole/src/main/webapp/app/navigation/services/userPageService.js index 4a42cfa59..e06e7a398 100644 --- a/guacamole/src/main/webapp/app/navigation/services/userPageService.js +++ b/guacamole/src/main/webapp/app/navigation/services/userPageService.js @@ -274,8 +274,14 @@ angular.module('navigation').factory('userPageService', ['$injector', if (homePage === SYSTEM_HOME_PAGE) pages.push(homePage); - // Add any settings pages - pages = pages.concat(generateSettingsPages(permissions)); + // Add generic link to the first-available settings page + var settingsPages = generateSettingsPages(permissions); + if (settingsPages.length) { + pages.push(new Page( + 'USER_MENU.ACTION_MANAGE_SETTINGS', + settingsPages[0].url + )); + } return pages; }; diff --git a/guacamole/src/main/webapp/app/navigation/styles/user-menu.css b/guacamole/src/main/webapp/app/navigation/styles/user-menu.css index ba54e150d..617ec2be4 100644 --- a/guacamole/src/main/webapp/app/navigation/styles/user-menu.css +++ b/guacamole/src/main/webapp/app/navigation/styles/user-menu.css @@ -195,16 +195,10 @@ background-image: url('images/action-icons/guac-home-dark.png'); } -.user-menu .options li a[href="#/manage/modules/users/"] { - background-image: url('images/user-icons/guac-user.png'); -} - -.user-menu .options li a[href="#/manage/modules/connections/"] { - background-image: url('images/protocol-icons/guac-monitor.png'); -} - +.user-menu .options li a[href="#/manage/modules/users/"], +.user-menu .options li a[href="#/manage/modules/connections/"], .user-menu .options li a[href="#/manage/modules/sessions/"] { - background-image: url('images/protocol-icons/guac-plug.png'); + background-image: url('images/action-icons/guac-config-dark.png'); } .user-menu .options li a.change-password { diff --git a/guacamole/src/main/webapp/translations/en_US.json b/guacamole/src/main/webapp/translations/en_US.json index c3d07bee5..476336861 100644 --- a/guacamole/src/main/webapp/translations/en_US.json +++ b/guacamole/src/main/webapp/translations/en_US.json @@ -11,6 +11,7 @@ "ACTION_LOGIN" : "Login", "ACTION_LOGOUT" : "Logout", "ACTION_MANAGE_CONNECTIONS" : "Manage Connections", + "ACTION_MANAGE_SETTINGS" : "Settings", "ACTION_MANAGE_SESSIONS" : "Active Sessions", "ACTION_MANAGE_USERS" : "Users", "ACTION_NAVIGATE_BACK" : "Back", @@ -422,6 +423,7 @@ "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", + "ACTION_MANAGE_SETTINGS" : "@:APP.ACTION_MANAGE_SETTINGS", "ACTION_MANAGE_USERS" : "@:APP.ACTION_MANAGE_USERS", "ACTION_NAVIGATE_HOME" : "@:APP.ACTION_NAVIGATE_HOME", "ACTION_SAVE" : "@:APP.ACTION_SAVE",