From 71e2644866a40dce0cde8b2147fefe28fe693433 Mon Sep 17 00:00:00 2001 From: Yinyin Liu Date: Mon, 17 Nov 2025 13:13:25 +0100 Subject: [PATCH] added SodistoreHome Battery View Soc and Voltage Color code in frontend --- .../BatteryView/BatteryViewSodioHome.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx index bb0fafb93..a3cf32746 100644 --- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx @@ -271,12 +271,14 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) { sx={{ width: '13%', textAlign: 'center', - - backgroundColor: '#32CD32', - color: 'black' + backgroundColor: + battery.Voltage < 32 || battery.Voltage > 63 + ? '#FF033E' + : '#32CD32', + color: 'inherit' }} > - {battery.Voltage + ' ' + 'V'} + {battery.Voltage + ' V'} 20 + ? '#32CD32' + : battery.Soc >= 10 + ? '#ffbf00' + : '#FF033E', color: 'inherit' }} >