From d2b4831e1870b2d3147ed3cad702bd14ab988a6d Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 13 Mar 2026 11:44:56 +0800 Subject: [PATCH] fix(ui): LOGIN at top-right, two-row header layout --- .../src/app/components/Header.tsx | 122 +++++++++--------- 1 file changed, 64 insertions(+), 58 deletions(-) diff --git a/sample_interface/src/app/components/Header.tsx b/sample_interface/src/app/components/Header.tsx index a69977eac..92601db7d 100644 --- a/sample_interface/src/app/components/Header.tsx +++ b/sample_interface/src/app/components/Header.tsx @@ -35,73 +35,79 @@ export function Header() { }; return ( -
- {/* Logo + Login (left side) */} -
-
- TCK - RTU -
- +
+ {/* Logo (left) */} +
+ TCK + RTU
-
- {/* Time */} -
- Time: - {formatTime(currentTime)} + {/* Right side - two rows */} +
+ {/* Top row: LOGIN (rightmost) */} +
+
- {/* Date */} -
- Date: - {formatDate(currentTime)} -
+ {/* Bottom row: all other status items */} +
+ {/* Time */} +
+ Time: + {formatTime(currentTime)} +
- {/* Station ID */} -
- Station: - {data.station.id} -
+ {/* Date */} +
+ Date: + {formatDate(currentTime)} +
- {/* Comm Status */} -
- {isOnline ? ( - <> - - - {data.communication.asu}ASU/{data.communication.dBm}dBm({data.communication.percentage}%) - - - ) : ( - <> - - OFFLINE - - )} -
+ {/* Station ID */} +
+ Station: + {data.station.id} +
- {/* Version */} -
- Ver: - {data.station.version} -
+ {/* Comm Status */} +
+ {isOnline ? ( + <> + + + {data.communication.asu}ASU/{data.communication.dBm}dBm({data.communication.percentage}%) + + + ) : ( + <> + + OFFLINE + + )} +
- {/* Solar Voltage */} -
- Solar: - {data.voltage.solar.toFixed(1)}V -
+ {/* Version */} +
+ Ver: + {data.station.version} +
- {/* Battery Voltage */} -
- Battery: - - {data.voltage.battery.toFixed(1)}V - - - {data.voltage.batteryStatus} - + {/* Solar Voltage */} +
+ Solar: + {data.voltage.solar.toFixed(1)}V +
+ + {/* Battery Voltage */} +
+ Battery: + + {data.voltage.battery.toFixed(1)}V + + + {data.voltage.batteryStatus} + +