PIN Pairing
+PIN Pairing
+
+
+
+
+
+
+ Paired Clients
+ Refresh
+ From b8f8b46b67460a4a16c42693cbdb05d59f9af58a Mon Sep 17 00:00:00 2001 From: Xander Frangos <33106561+xanderfrangos@users.noreply.github.com> Date: Sat, 20 Jan 2024 02:59:37 -0500 Subject: [PATCH] Added UI for unpairing individual clients --- src_assets/common/assets/web/pin.html | 50 +++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src_assets/common/assets/web/pin.html b/src_assets/common/assets/web/pin.html index fe18c49c66..1bb3091b9e 100644 --- a/src_assets/common/assets/web/pin.html +++ b/src_assets/common/assets/web/pin.html @@ -8,7 +8,7 @@
There are no paired clients.
`; + } + for (const unpairOption of clientList.querySelectorAll(".unpair")) { + unpairOption.addEventListener("click", () => { + fetch("/api/clients/unpair-single", { method: "POST", body: JSON.stringify({ uniqueid: unpairOption.dataset.uniqueid }) }).then(() => { + document.querySelector("#apply-alert").style.display = ""; + refreshClients(); + }); + }); + } + }); + } + refreshClients(); + + document.querySelector("#client-refresh").addEventListener("click", refreshClients); + document.querySelector("#apply-alert .apply").addEventListener("click", () => { + document.querySelector("#apply-alert").style.display = "none!important"; + fetch("/api/restart", { method: "POST" }); + }); + \ No newline at end of file