fix(ui): Logo to PNG, start.sh port fix, LOGIN position, Up/Down horizontal
- Logo: Use LOGO_TCK_small.png instead of SVG - start.sh: Fix arbitrary port handling (dev:8888 now works) - Header: Move LOGIN indicator to top-left next to logo - NavigationButtons: Make Up/Down horizontal, match title size
This commit is contained in:
BIN
logo/LOGO_TCK_small.png
Normal file
BIN
logo/LOGO_TCK_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -4,7 +4,7 @@ import { useSensorStore } from "../stores/sensorStore";
|
|||||||
import { VoltageDisplay } from "./VoltageDisplay";
|
import { VoltageDisplay } from "./VoltageDisplay";
|
||||||
import { BatteryStatus } from "./BatteryStatus";
|
import { BatteryStatus } from "./BatteryStatus";
|
||||||
import { LoginIndicator } from "./LoginIndicator";
|
import { LoginIndicator } from "./LoginIndicator";
|
||||||
import TCKLogo from "../../../../logo/tck_logo.svg";
|
import TCKLogo from "../../../../logo/LOGO_TCK_small.png";
|
||||||
|
|
||||||
export function Header() {
|
export function Header() {
|
||||||
const [currentTime, setCurrentTime] = useState(new Date());
|
const [currentTime, setCurrentTime] = useState(new Date());
|
||||||
@@ -36,11 +36,14 @@ export function Header() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-gray-950 border-b border-gray-700 px-2 py-1 flex items-center gap-2 text-xs">
|
<div className="bg-gray-950 border-b border-gray-700 px-2 py-1 flex items-center gap-2 text-xs">
|
||||||
{/* Logo */}
|
{/* Logo + Login (left side) */}
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<img src={TCKLogo} alt="TCK" className="w-6 h-6" />
|
<img src={TCKLogo} alt="TCK" className="w-6 h-6" />
|
||||||
<span className="text-white font-semibold">RTU</span>
|
<span className="text-white font-semibold">RTU</span>
|
||||||
</div>
|
</div>
|
||||||
|
<LoginIndicator isLoggedIn={isLoggedIn} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="flex-1 flex items-center gap-2 justify-end">
|
<div className="flex-1 flex items-center gap-2 justify-end">
|
||||||
{/* Time */}
|
{/* Time */}
|
||||||
@@ -84,9 +87,6 @@ export function Header() {
|
|||||||
<span className="text-white">{data.station.version}</span>
|
<span className="text-white">{data.station.version}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Login Status */}
|
|
||||||
<LoginIndicator isLoggedIn={isLoggedIn} />
|
|
||||||
|
|
||||||
{/* Solar Voltage */}
|
{/* Solar Voltage */}
|
||||||
<div className="flex items-center gap-1 px-2 py-1 bg-gray-800 rounded">
|
<div className="flex items-center gap-1 px-2 py-1 bg-gray-800 rounded">
|
||||||
<span className="text-gray-400">Solar:</span>
|
<span className="text-gray-400">Solar:</span>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ChevronUp, ChevronDown } from "lucide-react";
|
|||||||
import { Button } from "./ui/button";
|
import { Button } from "./ui/button";
|
||||||
|
|
||||||
export function NavigationButtons() {
|
export function NavigationButtons() {
|
||||||
const scrollAmount = 300; // pixels to scroll
|
const scrollAmount = 200;
|
||||||
|
|
||||||
const scrollUp = () => {
|
const scrollUp = () => {
|
||||||
const panel = document.getElementById("details-panel");
|
const panel = document.getElementById("details-panel");
|
||||||
@@ -19,20 +19,20 @@ export function NavigationButtons() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed top-20 right-4 flex flex-col gap-2 z-10">
|
<div className="fixed top-16 right-4 flex gap-1 z-10">
|
||||||
<Button
|
<Button
|
||||||
onClick={scrollUp}
|
onClick={scrollUp}
|
||||||
size="lg"
|
className="bg-blue-600 hover:bg-blue-700 text-white shadow-lg h-8 px-3 text-sm"
|
||||||
className="bg-blue-600 hover:bg-blue-700 text-white shadow-lg h-14 w-14 p-0"
|
|
||||||
>
|
>
|
||||||
<ChevronUp className="w-6 h-6" />
|
<ChevronUp className="w-4 h-4 mr-1" />
|
||||||
|
Up
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={scrollDown}
|
onClick={scrollDown}
|
||||||
size="lg"
|
className="bg-blue-600 hover:bg-blue-700 text-white shadow-lg h-8 px-3 text-sm"
|
||||||
className="bg-blue-600 hover:bg-blue-700 text-white shadow-lg h-14 w-14 p-0"
|
|
||||||
>
|
>
|
||||||
<ChevronDown className="w-6 h-6" />
|
Down
|
||||||
|
<ChevronDown className="w-4 h-4 ml-1" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
3
start.sh
3
start.sh
@@ -191,6 +191,9 @@ if [ $# -gt 0 ]; then
|
|||||||
elif [[ "$1" == preview:* ]]; then
|
elif [[ "$1" == preview:* ]]; then
|
||||||
port="${1#preview:}"
|
port="${1#preview:}"
|
||||||
run_preview_server "$port"
|
run_preview_server "$port"
|
||||||
|
elif [[ "$1" =~ ^[[:digit:]]+$ ]]; then
|
||||||
|
# Direct port number
|
||||||
|
run_dev_server "$1"
|
||||||
else
|
else
|
||||||
run_command "$1"
|
run_command "$1"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user