feat: embed player

This commit is contained in:
2024-01-15 12:47:32 +00:00
parent 5c1a143a7d
commit 88e2250c33
5 changed files with 53 additions and 14 deletions

View File

@ -26,6 +26,7 @@ import { IntlProvider } from "@/intl";
import { WidgetsPage } from "@/pages/widgets";
import { AlertsPage } from "@/pages/alerts";
import { StreamSummaryPage } from "@/pages/summary";
import { EmbededPage } from "./pages/embed";
const DashboardPage = lazy(() => import("./pages/dashboard"));
const db = new SnortSystemDb();
@ -126,6 +127,15 @@ const router = createBrowserRouter([
return null;
},
},
{
path: "/embed/:id",
element: <EmbededPage />,
loader: async () => {
db.ready = await db.isAvailable();
await System.Init();
return null;
},
}
]);
const root = ReactDOM.createRoot(document.getElementById("root") as HTMLDivElement);
root.render(