From 3ef87260839b29bcec2485d8420811154ca59b49 Mon Sep 17 00:00:00 2001 From: Raymond Ha Date: Sat, 3 Jun 2023 10:39:58 -0400 Subject: [PATCH] WebUI: Set Connection status and Speed limits tooltips PR #19052. Fixes #18958. --- src/webui/www/private/index.html | 4 ++-- src/webui/www/private/scripts/client.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html index 9490c6963..9aa01c063 100644 --- a/src/webui/www/private/index.html +++ b/src/webui/www/private/index.html @@ -244,9 +244,9 @@ - QBT_TR(Connection status)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Connection status: Firewalled)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Alternative speed limits: Off)QBT_TR[CONTEXT=MainWindow] QBT_TR(Download speed icon)QBT_TR[CONTEXT=MainWindow] diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index e9840e66b..846b85fce 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -874,14 +874,17 @@ window.addEvent('load', function() { case 'connected': $('connectionStatus').src = 'images/connected.svg'; $('connectionStatus').alt = 'QBT_TR(Connection status: Connected)QBT_TR[CONTEXT=MainWindow]'; + $('connectionStatus').title = 'QBT_TR(Connection status: Connected)QBT_TR[CONTEXT=MainWindow]'; break; case 'firewalled': $('connectionStatus').src = 'images/firewalled.svg'; $('connectionStatus').alt = 'QBT_TR(Connection status: Firewalled)QBT_TR[CONTEXT=MainWindow]'; + $('connectionStatus').title = 'QBT_TR(Connection status: Firewalled)QBT_TR[CONTEXT=MainWindow]'; break; default: $('connectionStatus').src = 'images/disconnected.svg'; $('connectionStatus').alt = 'QBT_TR(Connection status: Disconnected)QBT_TR[CONTEXT=MainWindow]'; + $('connectionStatus').title = 'QBT_TR(Connection status: Disconnected)QBT_TR[CONTEXT=MainWindow]'; break; } @@ -924,10 +927,12 @@ window.addEvent('load', function() { if (enabled) { $('alternativeSpeedLimits').src = 'images/slow.svg'; $('alternativeSpeedLimits').alt = 'QBT_TR(Alternative speed limits: On)QBT_TR[CONTEXT=MainWindow]'; + $('alternativeSpeedLimits').title = 'QBT_TR(Alternative speed limits: On)QBT_TR[CONTEXT=MainWindow]'; } else { $('alternativeSpeedLimits').src = 'images/slow_off.svg'; $('alternativeSpeedLimits').alt = 'QBT_TR(Alternative speed limits: Off)QBT_TR[CONTEXT=MainWindow]'; + $('alternativeSpeedLimits').title = 'QBT_TR(Alternative speed limits: Off)QBT_TR[CONTEXT=MainWindow]'; } };