From e76ba5644f799159d8efe0f8f54f71cab256dcd0 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 24 Aug 2024 22:29:23 -0700 Subject: [PATCH 1/5] GUACAMOLE-1866: Switch to black "X" for recent connection removal button. --- guacamole/src/main/frontend/src/app/home/styles/home.css | 3 +-- guacamole/src/main/frontend/src/images/x-black.svg | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 guacamole/src/main/frontend/src/images/x-black.svg diff --git a/guacamole/src/main/frontend/src/app/home/styles/home.css b/guacamole/src/main/frontend/src/app/home/styles/home.css index 7699fe87e..3c1cfe69d 100644 --- a/guacamole/src/main/frontend/src/app/home/styles/home.css +++ b/guacamole/src/main/frontend/src/app/home/styles/home.css @@ -90,11 +90,10 @@ a.home-connection, .empty.balancer a.home-connection-group { background-repeat: no-repeat; background-size: contain; background-position: center center; - background-image: url('images/x.svg'); + background-image: url('images/x-black.svg'); } .recent-connections .connection .remove-recent { - background-color: red; height: 1em; width: 1em; position: absolute; diff --git a/guacamole/src/main/frontend/src/images/x-black.svg b/guacamole/src/main/frontend/src/images/x-black.svg new file mode 100644 index 000000000..785889a0e --- /dev/null +++ b/guacamole/src/main/frontend/src/images/x-black.svg @@ -0,0 +1 @@ + \ No newline at end of file From 662216651019160429721a5c8db647bb13c82a1b Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 24 Aug 2024 22:29:54 -0700 Subject: [PATCH 2/5] GUACAMOLE-1866: Only show recent connection removal "X" when hovering connection. --- guacamole/src/main/frontend/src/app/home/styles/home.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guacamole/src/main/frontend/src/app/home/styles/home.css b/guacamole/src/main/frontend/src/app/home/styles/home.css index 3c1cfe69d..5a0d9d216 100644 --- a/guacamole/src/main/frontend/src/app/home/styles/home.css +++ b/guacamole/src/main/frontend/src/app/home/styles/home.css @@ -82,6 +82,14 @@ a.home-connection, .empty.balancer a.home-connection-group { box-shadow: none; } +.recent-connections .connection .remove-recent { + visibility: hidden; +} + +.recent-connections .connection:hover .remove-recent { + visibility: visible; +} + .recent-connections .connection .remove-recent::after { content: ''; display: block; From f53e23ca757845f5fd48a9cda853b21286b12e46 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 24 Aug 2024 23:21:57 -0700 Subject: [PATCH 3/5] GUACAMOLE-1866: Remove application header from home page. --- .../src/app/home/controllers/homeController.js | 8 +++++--- .../app/home/directives/guacRecentConnections.js | 10 ---------- .../main/frontend/src/app/home/styles/home.css | 5 ----- .../app/home/templates/guacRecentConnections.html | 2 +- .../frontend/src/app/home/templates/home.html | 15 +++++++-------- .../frontend/src/app/index/styles/headers.css | 9 ++++++--- 6 files changed, 19 insertions(+), 30 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/home/controllers/homeController.js b/guacamole/src/main/frontend/src/app/home/controllers/homeController.js index 92c149e6b..8d84b49e1 100644 --- a/guacamole/src/main/frontend/src/app/home/controllers/homeController.js +++ b/guacamole/src/main/frontend/src/app/home/controllers/homeController.js @@ -62,12 +62,14 @@ angular.module('home').controller('homeController', ['$scope', '$injector', ]; /** - * Returns true if recent connections should be displayed on the Guacamole - * home page, otherwise false. + * Returns whether the "Recent Connections" section should be displayed on + * the home screen. * * @returns {!boolean} + * true if recent connections should be displayed on the home screen, + * false otherwise. */ - $scope.willShowRecentConnections = function willShowRecentConnections() { + $scope.isRecentConnectionsVisible = function isRecentConnectionsVisible() { return preferenceService.preferences.showRecentConnections; }; diff --git a/guacamole/src/main/frontend/src/app/home/directives/guacRecentConnections.js b/guacamole/src/main/frontend/src/app/home/directives/guacRecentConnections.js index 57f141f3f..4be606524 100644 --- a/guacamole/src/main/frontend/src/app/home/directives/guacRecentConnections.js +++ b/guacamole/src/main/frontend/src/app/home/directives/guacRecentConnections.js @@ -74,16 +74,6 @@ angular.module('home').directive('guacRecentConnections', [function guacRecentCo && guacHistory.removeEntry(recentConnection.entry.id)); }; - /** - * Returns whether or not recent connections should be displayed. - * - * @returns {!boolean} - * true if recent connections should be displayed, otherwise false. - */ - $scope.willShowRecentConnections = function willShowRecentConnections() { - return preferenceService.preferences.showRecentConnections; - }; - /** * Returns whether recent connections are available for display. * diff --git a/guacamole/src/main/frontend/src/app/home/styles/home.css b/guacamole/src/main/frontend/src/app/home/styles/home.css index 5a0d9d216..8ae0486ed 100644 --- a/guacamole/src/main/frontend/src/app/home/styles/home.css +++ b/guacamole/src/main/frontend/src/app/home/styles/home.css @@ -77,11 +77,6 @@ a.home-connection, .empty.balancer a.home-connection-group { display: none; } -.header-app-name { - font-size: 0.85em; - box-shadow: none; -} - .recent-connections .connection .remove-recent { visibility: hidden; } diff --git a/guacamole/src/main/frontend/src/app/home/templates/guacRecentConnections.html b/guacamole/src/main/frontend/src/app/home/templates/guacRecentConnections.html index d24397445..2d25bc1db 100644 --- a/guacamole/src/main/frontend/src/app/home/templates/guacRecentConnections.html +++ b/guacamole/src/main/frontend/src/app/home/templates/guacRecentConnections.html @@ -1,4 +1,4 @@ -
+

{{'HOME.INFO_NO_RECENT_CONNECTIONS' | translate}}

diff --git a/guacamole/src/main/frontend/src/app/home/templates/home.html b/guacamole/src/main/frontend/src/app/home/templates/home.html index 6ba553025..872ac9803 100644 --- a/guacamole/src/main/frontend/src/app/home/templates/home.html +++ b/guacamole/src/main/frontend/src/app/home/templates/home.html @@ -2,16 +2,14 @@
-
-

{{'APP.NAME' | translate}}

+ +
+

{{'HOME.SECTION_HEADER_RECENT_CONNECTIONS' | translate}}

- - -
-

{{'HOME.SECTION_HEADER_RECENT_CONNECTIONS' | translate}}

-
- +
@@ -21,6 +19,7 @@ placeholder="'HOME.FIELD_PLACEHOLDER_FILTER' | translate" connection-properties="filteredConnectionProperties" connection-group-properties="filteredConnectionGroupProperties"> +
Date: Sat, 24 Aug 2024 23:32:11 -0700 Subject: [PATCH 4/5] GUACAMOLE-1866: Move and rename dedicated "Recent Connections" settings to more general "Appearance" section. --- .../templates/settingsPreferences.html | 38 +++++++++---------- .../main/frontend/src/translations/en.json | 4 +- .../main/frontend/src/translations/fr.json | 3 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/settings/templates/settingsPreferences.html b/guacamole/src/main/frontend/src/app/settings/templates/settingsPreferences.html index 84ebc7230..bf9684295 100644 --- a/guacamole/src/main/frontend/src/app/settings/templates/settingsPreferences.html +++ b/guacamole/src/main/frontend/src/app/settings/templates/settingsPreferences.html @@ -5,7 +5,25 @@

{{'SETTINGS_PREFERENCES.HELP_LOCALE' | translate}}

- + + +

{{'SETTINGS_PREFERENCES.SECTION_HEADER_APPEARANCE' | translate}}

+
+

{{'SETTINGS_PREFERENCES.HELP_APPEARANCE' | translate}}

+
+ + + + + + + + + +
{{'SETTINGS_PREFERENCES.FIELD_HEADER_SHOW_RECENT_CONNECTIONS' | translate}}
{{'SETTINGS_PREFERENCES.FIELD_HEADER_NUMBER_RECENT_CONNECTIONS' | translate}}
+
+
+

{{'SETTINGS_PREFERENCES.SECTION_HEADER_UPDATE_PASSWORD' | translate}}

@@ -89,24 +107,6 @@
- -

{{'SETTINGS_PREFERENCES.SECTION_HEADER_RECENT_CONNECTIONS' | translate}}

-
-

{{'SETTINGS_PREFERENCES.HELP_RECENT_CONNECTIONS' | translate}}

-
- - - - - - - - - -
{{'SETTINGS_PREFERENCES.FIELD_HEADER_SHOW_RECENT_CONNECTIONS' | translate}}
{{'SETTINGS_PREFERENCES.FIELD_HEADER_NUMBER_RECENT_CONNECTIONS' | translate}}
-
-
-
Date: Sun, 25 Aug 2024 00:23:21 -0700 Subject: [PATCH 5/5] GUACAMOLE-1740: Do not require multiple clicks to begin editing the clipboard. --- .../app/clipboard/directives/guacClipboard.js | 25 ++++++----- .../src/app/clipboard/styles/clipboard.css | 43 +++++++++++++++++-- .../clipboard/templates/guacClipboard.html | 14 ++++-- .../main/frontend/src/translations/ca.json | 2 +- .../main/frontend/src/translations/cs.json | 2 +- .../main/frontend/src/translations/de.json | 2 +- .../main/frontend/src/translations/en.json | 2 +- .../main/frontend/src/translations/fr.json | 2 +- .../main/frontend/src/translations/ja.json | 4 +- .../main/frontend/src/translations/zh.json | 2 +- 10 files changed, 74 insertions(+), 24 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js b/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js index 789756bd8..315b08b5f 100644 --- a/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js +++ b/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js @@ -30,6 +30,7 @@ angular.module('clipboard').directive('guacClipboard', ['$injector', const ClipboardData = $injector.get('ClipboardData'); // Required services + const $window = $injector.get('$window'); const clipboardService = $injector.get('clipboardService'); /** @@ -53,24 +54,28 @@ angular.module('clipboard').directive('guacClipboard', ['$injector', * editor via this DOM element rather than updating a model so that we * are prepared for future support of rich text contents. * - * @type Element + * @type {!Element} */ - var element = $element[0].querySelectorAll('.clipboard.active')[0]; + var element = $element[0].querySelectorAll('.clipboard')[0]; /** - * When isActive is set to true then the Clipboard data will be - * displayed in the Clipboard Editor. When false, the Clipboard Editor - * will not be displayed with Clipboard data. + * Whether clipboard contents should be displayed in the clipboard + * editor. If false, clipboard contents will not be displayed until + * the user manually reveals them. * - * @type Boolean + * @type {!boolean} */ - $scope.isActive = false; + $scope.contentsShown = false; /** - * Updates clipboard editor to be active. + * Reveals the contents of the clipboard editor, automatically + * assigning input focus to the editor if possible. */ - $scope.setActive = function setActive() { - $scope.isActive = true; + $scope.showContents = function showContents() { + $scope.contentsShown = true; + $window.setTimeout(function setFocus() { + element.focus(); + }, 0); }; /** diff --git a/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css b/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css index 3bb602c7f..cec0c2650 100644 --- a/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css +++ b/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css @@ -58,13 +58,50 @@ overflow: hidden; } -#clipboard-settings .clipboard.active { +.clipboard-editor { + position: relative; +} + +.clipboard-editor .clipboard { overflow: auto; font-size: 1em; } -#clipboard-settings .clipboard.inactive { +.clipboard-editor .clipboard.clipboard-contents-hidden { + color: transparent; + overflow: hidden; +} + +.clipboard-editor .clipboard-contents-hidden-hint { + + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + cursor: pointer; + + display: flex; + align-items: center; + +} + +.clipboard-editor .clipboard-contents-hidden-hint .clipboard-contents-hidden-hint-text { + + flex: 1; + + background: rgba(0, 0, 0, 0.125); + color: #888; + + padding: 0.5em; overflow: hidden; font-size: 0.9em; - opacity: 0.5; + text-align: center; + font-style: italic; + +} + +.clipboard-editor .clipboard-contents-hidden-hint:hover .clipboard-contents-hidden-hint-text { + text-decoration: underline; } diff --git a/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html b/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html index 4e1ebda8e..159ee356a 100644 --- a/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html +++ b/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html @@ -1,4 +1,12 @@ -
- - +
+ +
+

{{ 'CLIENT.ACTION_SHOW_CLIPBOARD' | translate }}

+
diff --git a/guacamole/src/main/frontend/src/translations/ca.json b/guacamole/src/main/frontend/src/translations/ca.json index 658c9232f..42829cc9f 100644 --- a/guacamole/src/main/frontend/src/translations/ca.json +++ b/guacamole/src/main/frontend/src/translations/ca.json @@ -59,6 +59,7 @@ "ACTION_DISCONNECT" : "Desconnecta", "ACTION_RECONNECT" : "Torneu a connectar", + "ACTION_SHOW_CLIPBOARD" : "Feu clic per veure les dades del porta-retalls.", "ACTION_UPLOAD_FILES" : "Carregueu fitxers", "DIALOG_HEADER_CONNECTING" : "Connectant", @@ -143,7 +144,6 @@ "TEXT_CLIENT_STATUS_DISCONNECTED" : "Heu estat desconnectats.", "TEXT_CLIENT_STATUS_UNSTABLE" : "La connexió de xarxa al servidor Guacamole sembla inestable.", "TEXT_CLIENT_STATUS_WAITING" : "Connectat a Guacamole. Esperant resposta ...", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "Feu clic per veure les dades del porta-retalls...", "TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}", "TEXT_RECONNECT_COUNTDOWN" : "Re-conectant en {REMAINING} {REMAINING, plural, one{segon} other{segons}}...", "TEXT_USER_JOINED" : "{USERNAME} s'ha afegit a la connexió.", diff --git a/guacamole/src/main/frontend/src/translations/cs.json b/guacamole/src/main/frontend/src/translations/cs.json index fd52edb64..9120cc81e 100644 --- a/guacamole/src/main/frontend/src/translations/cs.json +++ b/guacamole/src/main/frontend/src/translations/cs.json @@ -71,6 +71,7 @@ "ACTION_RECONNECT" : "Znovu připojit", "ACTION_SAVE_FILE" : "@:APP.ACTION_SAVE", "ACTION_SHARE" : "@:APP.ACTION_SHARE", + "ACTION_SHOW_CLIPBOARD" : "Kliknutím zobrazíte obsah schránky.", "ACTION_UPLOAD_FILES" : "Nahrát soubory", "DIALOG_HEADER_CONNECTING" : "Připojování", @@ -163,7 +164,6 @@ "TEXT_USER_LEFT" : "{USERNAME} opustil spojení.", "TEXT_RECONNECT_COUNTDOWN" : "Znovu připojuji {REMAINING} {REMAINING, plural, one{sekundu} other{sekund}}...", "TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "Kliknutím zobrazíte obsah schránky...", "URL_OSK_LAYOUT" : "layouts/en-us-qwerty.json" diff --git a/guacamole/src/main/frontend/src/translations/de.json b/guacamole/src/main/frontend/src/translations/de.json index e9bcab55d..bcffc6b13 100644 --- a/guacamole/src/main/frontend/src/translations/de.json +++ b/guacamole/src/main/frontend/src/translations/de.json @@ -71,6 +71,7 @@ "ACTION_RECONNECT" : "Neu verbinden", "ACTION_SAVE_FILE" : "@:APP.ACTION_SAVE", "ACTION_SHARE" : "@:APP.ACTION_SHARE", + "ACTION_SHOW_CLIPBOARD" : "Klicken um Zwischenablage anzuzeigen.", "ACTION_UPLOAD_FILES" : "Dateien hochladen", "DIALOG_HEADER_CONNECTING" : "Verbinden", @@ -163,7 +164,6 @@ "TEXT_USER_LEFT" : "{USERNAME} hat die Verbindung verlassen.", "TEXT_RECONNECT_COUNTDOWN" : "Neuverbindung in {REMAINING} {REMAINING, plural, one{Sekunde} other{Sekunden}}...", "TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "Klicken um Zwischenablage anzuzeigen...", "URL_OSK_LAYOUT" : "layouts/de-de-qwertz.json" diff --git a/guacamole/src/main/frontend/src/translations/en.json b/guacamole/src/main/frontend/src/translations/en.json index 0cd0cc9cf..5069f7b14 100644 --- a/guacamole/src/main/frontend/src/translations/en.json +++ b/guacamole/src/main/frontend/src/translations/en.json @@ -76,6 +76,7 @@ "ACTION_RECONNECT" : "Reconnect", "ACTION_SAVE_FILE" : "@:APP.ACTION_SAVE", "ACTION_SHARE" : "@:APP.ACTION_SHARE", + "ACTION_SHOW_CLIPBOARD" : "Click to view clipboard contents.", "ACTION_UPLOAD_FILES" : "Upload Files", "DIALOG_HEADER_CONNECTING" : "Connecting", @@ -168,7 +169,6 @@ "TEXT_USER_LEFT" : "{USERNAME} has left the connection.", "TEXT_RECONNECT_COUNTDOWN" : "Reconnecting in {REMAINING} {REMAINING, plural, one{second} other{seconds}}...", "TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "Click to view clipboard data...", "URL_OSK_LAYOUT" : "layouts/en-us-qwerty.json" diff --git a/guacamole/src/main/frontend/src/translations/fr.json b/guacamole/src/main/frontend/src/translations/fr.json index f6477400d..b4deafa55 100644 --- a/guacamole/src/main/frontend/src/translations/fr.json +++ b/guacamole/src/main/frontend/src/translations/fr.json @@ -64,6 +64,7 @@ "ACTION_CANCEL" : "@:APP.ACTION_CANCEL", "ACTION_CLEAR_CLIENT_MESSAGES" : "@:APP.ACTION_CLEAR", "ACTION_CLEAR_COMPLETED_TRANSFERS" : "@:APP.ACTION_CLEAR", + "ACTION_SHOW_CLIPBOARD" : "Cliquez pour afficher le contenu du presse-papiers.", "ACTION_CONTINUE" : "@:APP.ACTION_CONTINUE", "ACTION_DISCONNECT" : "Déconnecter", "ACTION_FULLSCREEN" : "Plein écran", @@ -165,7 +166,6 @@ "TEXT_USER_LEFT" : "{USERNAME} a quitté la connexion.", "TEXT_RECONNECT_COUNTDOWN" : "Reconnexion dans {REMAINING} {REMAINING, plural, one{seconde} other{secondes}}...", "TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "Cliquez pour afficher le contenu du presse-papiers...", "URL_OSK_LAYOUT" : "layouts/fr-fr-azerty.json" diff --git a/guacamole/src/main/frontend/src/translations/ja.json b/guacamole/src/main/frontend/src/translations/ja.json index 2750d38fd..45a079cc9 100644 --- a/guacamole/src/main/frontend/src/translations/ja.json +++ b/guacamole/src/main/frontend/src/translations/ja.json @@ -55,6 +55,7 @@ "ACTION_RECONNECT" : "再接続", "ACTION_SAVE_FILE" : "@:APP.ACTION_SAVE", "ACTION_SHARE" : "@:APP.ACTION_SHARE", + "ACTION_SHOW_CLIPBOARD" : "クリックをしてコピー/カットされたテキストが表示されます。", "ACTION_UPLOAD_FILES" : "ファイルアップロード", "DIALOG_HEADER_CONNECTING" : "接続", @@ -132,8 +133,7 @@ "TEXT_CLIENT_STATUS_DISCONNECTED" : "切断されました。", "TEXT_CLIENT_STATUS_UNSTABLE" : "Guacamoleサーバへのネットワーク接続が不安定です。", "TEXT_CLIENT_STATUS_WAITING" : "Guacamoleサーバに接続しました。応答を待っています", - "TEXT_RECONNECT_COUNTDOWN" : "再接続しています... {REMAINING} {REMAINING, plural, one{second} other{seconds}}...", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "クリックをしてコピー/カットされたテキストが表示されます..." + "TEXT_RECONNECT_COUNTDOWN" : "再接続しています... {REMAINING} {REMAINING, plural, one{second} other{seconds}}..." }, diff --git a/guacamole/src/main/frontend/src/translations/zh.json b/guacamole/src/main/frontend/src/translations/zh.json index 76e9a2a81..b16934c64 100644 --- a/guacamole/src/main/frontend/src/translations/zh.json +++ b/guacamole/src/main/frontend/src/translations/zh.json @@ -72,6 +72,7 @@ "ACTION_RECONNECT" : "重新连接", "ACTION_SAVE_FILE" : "@:APP.ACTION_SAVE", "ACTION_SHARE" : "@:APP.ACTION_SHARE", + "ACTION_SHOW_CLIPBOARD" : "点击以查看剪贴板内容。", "ACTION_UPLOAD_FILES" : "上传文件", "DIALOG_HEADER_CONNECTING" : "正在连接", @@ -164,7 +165,6 @@ "TEXT_USER_LEFT" : "用户 {USERNAME} 断开了连接。", "TEXT_RECONNECT_COUNTDOWN" : "在 {REMAINING} 秒后重连...", "TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}", - "TEXT_CLIPBOARD_AWAITING_FOCUS" : "点击以查看剪贴板内容...", "URL_OSK_LAYOUT" : "layouts/en-us-qwerty.json"