From 3dac7a5577f4849ca41f9574b2240ce6fafabfcc Mon Sep 17 00:00:00 2001 From: zgaetano Date: Tue, 31 Mar 2026 15:29:58 -0400 Subject: [PATCH] Add src/App.tsx --- src/App.tsx | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/App.tsx diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..0ff55ba --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,86 @@ +import { useState } from "react"; +import { useStatus } from "./hooks/useStatus"; +import { StatusBar } from "./components/StatusBar"; +import { HostCard } from "./components/HostCard"; +import { AddHostModal } from "./components/AddHostModal"; + +export default function App() { + const { status, hosts, error, loading, refresh } = useStatus(3000); + const [showAddModal, setShowAddModal] = useState(false); + + return ( +
+ {/* Title bar / drag region for Tauri */} +
+
+ 🌙 Moonlight Relay +
+ +
+ + {/* VPN + moonlight status */} + + + {/* Main content */} +
+ {/* Host grid */} + {hosts.length === 0 && !loading ? ( +
+ 🔍 +

No hosts found yet.

+

+ Make sure Apollo/Artemis is running on your gaming PC and it's + reachable over Tailscale (or your local network). +

+ +
+ ) : ( + <> +
+ {hosts.map((h) => ( + + ))} + {/* Add host card */} + +
+ + )} +
+ + {/* Add host modal */} + {showAddModal && ( + setShowAddModal(false)} + onAdded={refresh} + /> + )} +
+ ); +}