mirror of
https://github.com/Dasemu/remote-mcp-manager.git
synced 2026-11-26 15:26:27 +00:00
Replace the unstyled apps/web UI with a cohesive dark/light "ops console" design: sidebar shell, semantic status badges for all 8 installation states, a real data table for the installation list, a modal install wizard, and a sectioned detail view (access, configuration, actions, build log) with copy-to-clipboard for the public URL and bearer token. Styling is plain CSS with custom-property design tokens (no new runtime dependency); Inter + JetBrains Mono loaded via Google Fonts. All existing API calls and behavior are preserved unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
29 lines
967 B
TypeScript
29 lines
967 B
TypeScript
import { useEffect, useState } from "react";
|
|
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|
import { api } from "./api/client";
|
|
import { Login } from "./pages/Login";
|
|
import { InstallationList } from "./pages/InstallationList";
|
|
import { InstallationDetail } from "./pages/InstallationDetail";
|
|
|
|
export function App() {
|
|
const [authenticated, setAuthenticated] = useState<boolean | null>(null);
|
|
|
|
useEffect(() => {
|
|
api.session().then((s) => setAuthenticated(s.authenticated));
|
|
}, []);
|
|
|
|
if (authenticated === null) return null;
|
|
if (!authenticated) return <Login onLoggedIn={() => setAuthenticated(true)} />;
|
|
|
|
const onLoggedOut = () => setAuthenticated(false);
|
|
|
|
return (
|
|
<BrowserRouter>
|
|
<Routes>
|
|
<Route path="/" element={<InstallationList onLoggedOut={onLoggedOut} />} />
|
|
<Route path="/installations/:id" element={<InstallationDetail onLoggedOut={onLoggedOut} />} />
|
|
</Routes>
|
|
</BrowserRouter>
|
|
);
|
|
}
|