2023-12-08 14:33:22 +01:00
|
|
|
import Providers from "@/context/providers";
|
|
|
|
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|
|
|
import Wrapper from "@/components/Wrapper";
|
2024-02-27 22:39:05 +01:00
|
|
|
import Sidebar from "@/components/navigation/Sidebar";
|
2023-12-08 14:33:22 +01:00
|
|
|
import Live from "@/pages/Live";
|
|
|
|
import Export from "@/pages/Export";
|
|
|
|
import Storage from "@/pages/Storage";
|
|
|
|
import System from "@/pages/System";
|
|
|
|
import ConfigEditor from "@/pages/ConfigEditor";
|
|
|
|
import Logs from "@/pages/Logs";
|
|
|
|
import NoMatch from "@/pages/NoMatch";
|
|
|
|
import Settings from "@/pages/Settings";
|
2023-12-21 01:37:35 +01:00
|
|
|
import UIPlayground from "./pages/UIPlayground";
|
2024-02-21 21:07:32 +01:00
|
|
|
import Events from "./pages/Events";
|
2024-02-27 22:39:05 +01:00
|
|
|
import { isDesktop, isMobile } from "react-device-detect";
|
2024-02-22 03:27:02 +01:00
|
|
|
import Statusbar from "./components/Statusbar";
|
2024-02-27 22:39:05 +01:00
|
|
|
import Bottombar from "./components/navigation/Bottombar";
|
2023-12-08 14:33:22 +01:00
|
|
|
|
|
|
|
function App() {
|
|
|
|
return (
|
|
|
|
<Providers>
|
|
|
|
<BrowserRouter>
|
|
|
|
<Wrapper>
|
2024-02-21 21:07:32 +01:00
|
|
|
<div className="w-full h-full pt-2 overflow-hidden">
|
2024-02-27 22:39:05 +01:00
|
|
|
{isDesktop && <Sidebar />}
|
2024-02-22 03:27:02 +01:00
|
|
|
{isDesktop && <Statusbar />}
|
2024-02-27 22:39:05 +01:00
|
|
|
{isMobile && <Bottombar />}
|
2023-12-21 01:37:35 +01:00
|
|
|
<div
|
|
|
|
id="pageRoot"
|
2024-02-27 22:39:05 +01:00
|
|
|
className="absolute left-0 md:left-16 top-2 right-0 bottom-16 md:bottom-8 overflow-hidden"
|
2023-12-21 01:37:35 +01:00
|
|
|
>
|
2023-12-08 14:33:22 +01:00
|
|
|
<Routes>
|
2024-02-10 13:30:53 +01:00
|
|
|
<Route path="/" element={<Live />} />
|
2024-02-21 21:07:32 +01:00
|
|
|
<Route path="/events" element={<Events />} />
|
2023-12-08 14:33:22 +01:00
|
|
|
<Route path="/export" element={<Export />} />
|
|
|
|
<Route path="/storage" element={<Storage />} />
|
|
|
|
<Route path="/system" element={<System />} />
|
|
|
|
<Route path="/settings" element={<Settings />} />
|
|
|
|
<Route path="/config" element={<ConfigEditor />} />
|
|
|
|
<Route path="/logs" element={<Logs />} />
|
2023-12-21 01:37:35 +01:00
|
|
|
<Route path="/playground" element={<UIPlayground />} />
|
2023-12-08 14:33:22 +01:00
|
|
|
<Route path="*" element={<NoMatch />} />
|
|
|
|
</Routes>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Wrapper>
|
|
|
|
</BrowserRouter>
|
|
|
|
</Providers>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|