From 5a30278aaa2488c6cac1cf201f4afcf16eba6fe3 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Thu, 26 Jan 2023 21:58:43 +1100 Subject: [PATCH] Change action button color to green once connected to cadence sensor --- static/js/BLE.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/BLE.js b/static/js/BLE.js index f751859..82f07c8 100644 --- a/static/js/BLE.js +++ b/static/js/BLE.js @@ -24,6 +24,9 @@ async function connect(props) { console.log("> Notifications started"); characteristic.addEventListener("characteristicvaluechanged", props.onChange); console.log("> Characteristic value changed event listener added"); + + btn.classList.remove("bg-red-600"); + btn.classList.add("bg-green-600"); /* socket = io({ reconnection: true,