From ca2b7b3dd1c388ea2e5d981c70fdfdd469963982 Mon Sep 17 00:00:00 2001 From: root <165865819+brianshea2@users.noreply.github.com> Date: Tue, 7 Jan 2025 18:50:48 +0000 Subject: [PATCH] handle special characters (e.g., newlines) in node data (#31) --- website/index.html | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/website/index.html b/website/index.html index 6cfbb74..7eca030 100644 --- a/website/index.html +++ b/website/index.html @@ -97,7 +97,9 @@ }
Firmware | ${html(fwVersion)} |
---|---|
Region | ${html(region)} |
Modem preset | ${html(modemPreset)} |
Has default channel | True |
Online local nodes | ${onlineLocalNodes} |
Power | ${batteryLevel > 100 ? 'Plugged in' : `${batteryLevel}%`}${voltage ? ` (${voltage.toFixed(2)}V)` : ''} |
ChUtil | ${chUtil.toFixed(2)}% |
AirUtilTX | ${airUtilTx.toFixed(2)}% |
Uptime | ${duration(uptime)} |
Temperature | ${temperature.toFixed(1)}℃ / ${(temperature * 1.8 + 32).toFixed(1)}℉ |
Relative Humidity | ${Math.round(relativeHumidity)}% |
Firmware | ${html(fwVersion)} |
Region | ${html(region)} |
Modem preset | ${html(modemPreset)} |
Has default channel | True |
Online local nodes | ${onlineLocalNodes} |
Power | ${batteryLevel > 100 ? 'Plugged in' : `${batteryLevel}%`}` + + `${voltage ? ` (${voltage.toFixed(2)}V)` : ''} |
ChUtil | ${chUtil.toFixed(2)}% |
AirUtilTX | ${airUtilTx.toFixed(2)}% |
Uptime | ${duration(uptime)} |
Temperature | ${temperature.toFixed(1)}℃ / ` + + `${(temperature * 1.8 + 32).toFixed(1)}℉ |
Relative Humidity | ${Math.round(relativeHumidity)}% |
Barometric Pressure | ${Math.round(barometricPressure)} hPa |
Altitude | ${altitude.toLocaleString()} m above MSL |
Location precision | ± ${precisionMargins[precision-1].toLocaleString()} m (orange circle) |
Altitude | ${altitude.toLocaleString()} m above MSL |
Location precision | ±" + + `${precisionMargins[precision-1].toLocaleString()} m (orange circle) |
Last seen | via | root topic | channel |
---|