Add saved filter views, a customisable dashboard, server comparison, row keyboard navigation and share links
- Table search, status, tag and sort live in the address; Save view pins one as a favourite. - Dashboard cards can be moved and hidden per user (users.dashboard_layout, migration 0022). - Compare two to four servers' load, memory or disk on one chart. - j/k move through table rows that open a detail panel. - Share links open a read-only wall without signing in, numbers only or with names (share_links, migration 0023); the wall is split into a shared view over two data sources. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
906220040e
commit
44e393f172
50 files changed
+6114
-258
No files matched your search
+17
-1
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState, type ReactNode } from "react";
|
||||
import { Routes, Route, Navigate } from "react-router-dom";
|
||||
import { Routes, Route, Navigate, useLocation } from "react-router-dom";
|
||||
import { api, type CurrentUser, type UserRole, UnauthorizedError } from "./api/client";
|
||||
import Login from "./pages/Login";
|
||||
import Dashboard from "./pages/Dashboard";
|
||||
@@ -13,6 +13,7 @@ import Ports from "./pages/Ports";
|
||||
import Dns from "./pages/Dns";
|
||||
import Servers from "./pages/Servers";
|
||||
import ServerDetail from "./pages/ServerDetail";
|
||||
import ServerCompare from "./pages/ServerCompare";
|
||||
import Integrations from "./pages/Integrations";
|
||||
import Docker from "./pages/Docker";
|
||||
import Tailscale from "./pages/Tailscale";
|
||||
@@ -40,9 +41,11 @@ import LogSettings from "./pages/settings/LogSettings";
|
||||
import BackupSettings from "./pages/settings/BackupSettings";
|
||||
import NameSettings from "./pages/settings/NameSettings";
|
||||
import AlertTicketSettings from "./pages/settings/AlertTicketSettings";
|
||||
import ShareSettings from "./pages/settings/ShareSettings";
|
||||
import AppShell from "./layout/AppShell";
|
||||
import DialogHost from "./components/DialogHost";
|
||||
import Wall from "./pages/Wall";
|
||||
import SharedWall from "./pages/SharedWall";
|
||||
import MapPage from "./pages/Map";
|
||||
import { setDateTimeSettings } from "./utils/date";
|
||||
import { setPageSize } from "./utils/pageSize";
|
||||
@@ -69,8 +72,11 @@ function RequireRole({
|
||||
|
||||
export default function App() {
|
||||
const [user, setUser] = useState<CurrentUser | null | undefined>(undefined);
|
||||
// A share link's page is for someone who isn't signed in: it asks nothing of the app's own session.
|
||||
const shared = useLocation().pathname.startsWith("/share/wall/");
|
||||
|
||||
useEffect(() => {
|
||||
if (shared) return;
|
||||
api.me().then(
|
||||
(res) => setUser(res.user),
|
||||
(err) => {
|
||||
@@ -86,6 +92,14 @@ export default function App() {
|
||||
}).catch(() => {});
|
||||
}, []);
|
||||
|
||||
if (shared) {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/share/wall/:token" element={<SharedWall />} />
|
||||
</Routes>
|
||||
);
|
||||
}
|
||||
|
||||
if (user === undefined) {
|
||||
return <div className="loading-screen">Loading…</div>;
|
||||
}
|
||||
@@ -110,6 +124,7 @@ function Shelled({ user }: { user: CurrentUser }) {
|
||||
<Route path="/" element={<Dashboard user={user} />} />
|
||||
<Route path="/map" element={<MapPage />} />
|
||||
<Route path="/servers" element={<Servers user={user} />} />
|
||||
<Route path="/servers/compare" element={<ServerCompare />} />
|
||||
<Route path="/servers/:id" element={<ServerDetail user={user} />} />
|
||||
<Route path="/dns" element={<Dns user={user} />} />
|
||||
<Route path="/ipam" element={<Ipam user={user} />} />
|
||||
@@ -179,6 +194,7 @@ function Shelled({ user }: { user: CurrentUser }) {
|
||||
<Route path="tags" element={<TagSettings />} />
|
||||
<Route path="names" element={<NameSettings />} />
|
||||
<Route path="alert-tickets" element={<AlertTicketSettings />} />
|
||||
<Route path="share" element={<ShareSettings />} />
|
||||
<Route path="cache" element={<CacheSettings />} />
|
||||
<Route path="logs" element={<LogSettings />} />
|
||||
<Route path="backup" element={<BackupSettings />} />
|
||||
|
||||
Reference in new issue
Block a user