From 5ef7b03f1b8226d213f98063f375cc03934b153a Mon Sep 17 00:00:00 2001 From: Xander Frangos <33106561+xanderfrangos@users.noreply.github.com> Date: Wed, 17 Apr 2024 12:41:14 -0400 Subject: [PATCH] Update web UI to use localization for single device pairing/unpairing --- src_assets/common/assets/web/pin.html | 6 ++--- .../assets/web/public/assets/locale/en.json | 11 ++++++--- .../common/assets/web/troubleshooting.html | 23 ++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src_assets/common/assets/web/pin.html b/src_assets/common/assets/web/pin.html index 2418c9682b7..1b3c6482285 100644 --- a/src_assets/common/assets/web/pin.html +++ b/src_assets/common/assets/web/pin.html @@ -8,11 +8,11 @@
-

{{ $t('pin.pin_pairing') }}

+

{{ $t('pin.pin_pairing') }}

- - + +
diff --git a/src_assets/common/assets/web/public/assets/locale/en.json b/src_assets/common/assets/web/public/assets/locale/en.json index f36b984c24e..8013bb914a7 100644 --- a/src_assets/common/assets/web/public/assets/locale/en.json +++ b/src_assets/common/assets/web/public/assets/locale/en.json @@ -6,6 +6,7 @@ "cancel": "Cancel", "disabled": "Disabled", "disabled_def": "Disabled (default)", + "dismiss": "Dismiss", "do_cmd": "Do Command", "elevated": "Elevated", "enabled": "Enabled", @@ -336,6 +337,7 @@ "success_msg": "Password has been changed successfully! This page will reload soon, your browser will ask you for the new credentials." }, "pin": { + "device_name": "Device Name", "pair_failure": "Pairing Failed: Check if the PIN is typed correctly", "pair_success": "Success! Please check Moonlight to continue", "pin_pairing": "PIN Pairing", @@ -364,10 +366,13 @@ "restart_sunshine_desc": "If Sunshine isn't working properly, you can try restarting it. This will terminate any running sessions.", "restart_sunshine_success": "Sunshine is restarting", "troubleshooting": "Troubleshooting", - "unpair_all": "Unpair All", - "unpair_all_desc": "Remove all your paired devices", + "unpair_all": "Unpair Devices", + "unpair_all_desc": "Remove your paired devices. Unpaired devices with an active session will remain connected, but cannot start or resume a session.", "unpair_all_error": "Error while unpairing", - "unpair_all_success": "Unpair Successful!" + "unpair_all_success": "However, the device(s) may still be in an active session. Use the 'Force Close' button above to end any open sessions.", + "unpair_single_no_devices": "There are no paired devices.", + "unpair_single_unknown": "Unknown Client", + "unpair_title": "Unpair Devices" }, "welcome": { "confirm_password": "Confirm password", diff --git a/src_assets/common/assets/web/troubleshooting.html b/src_assets/common/assets/web/troubleshooting.html index 0d75ec3187d..df3c8eafbb3 100644 --- a/src_assets/common/assets/web/troubleshooting.html +++ b/src_assets/common/assets/web/troubleshooting.html @@ -75,37 +75,34 @@

{{ $t('troubleshooting.restart_sunshine') }}

- +
-

{{ $t('troubleshooting.unpair_all') }}

+

{{ $t('troubleshooting.unpair_title') }}

+
+

{{ $t('troubleshooting.unpair_all_desc') }}

-
Success! Click 'Apply' to restart Sunshine and apply changes. This will terminate any running sessions.
- -
-
- {{ $t('troubleshooting.unpair_all_success') }} +
{{ $t('_common.success') }} {{ $t('troubleshooting.unpair_all_success') }}
+
{{ $t('troubleshooting.unpair_all_error') }}
-
-

{{ $t('troubleshooting.unpair_all_desc') }}

@@ -199,6 +196,7 @@

{{ $t('troubleshooting.logs') }}

setTimeout(() => { this.unpairAllStatus = null; }, 5000); + this.refreshClients(); }); }, unpairSingle(uuid) { @@ -221,9 +219,6 @@

{{ $t('troubleshooting.logs') }}

}, clickedApplyBanner() { this.showApplyMessage = false; - fetch("/api/restart", { - method: "POST", - }); }, copyLogs() { navigator.clipboard.writeText(this.actualLogs);