From bb3c0ba03326aa8e1991a51dc6eeee94131c3112 Mon Sep 17 00:00:00 2001 From: Xander Frangos <33106561+xanderfrangos@users.noreply.github.com> Date: Wed, 17 Apr 2024 21:21:35 -0400 Subject: [PATCH] Sort client list alphabetically https://github.com/LizardByte/Sunshine/pull/2042#pullrequestreview-2007515774 --- src_assets/common/assets/web/troubleshooting.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src_assets/common/assets/web/troubleshooting.html b/src_assets/common/assets/web/troubleshooting.html index df3c8eafbb3..249924e3f1b 100644 --- a/src_assets/common/assets/web/troubleshooting.html +++ b/src_assets/common/assets/web/troubleshooting.html @@ -211,7 +211,9 @@

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

.then((response) => { const clientList = document.querySelector("#client-list"); if (response.status === 'true' && response.named_certs && response.named_certs.length) { - this.clients = response.named_certs; + this.clients = response.named_certs.sort((a, b) => { + return (a.name.toLowerCase() > b.name.toLowerCase() || a.name == "" ? 1 : -1) + }); } else { this.clients = []; }