mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-03 08:37:37 +08:00
webui ui-kit: add global reusable modal/confirm/alert and loading overlay
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
||||
import { AppProvider } from './context/AppContext';
|
||||
import { UIProvider } from './context/UIContext';
|
||||
import Layout from './components/Layout';
|
||||
import Dashboard from './pages/Dashboard';
|
||||
import Chat from './pages/Chat';
|
||||
@@ -14,20 +15,22 @@ import Memory from './pages/Memory';
|
||||
export default function App() {
|
||||
return (
|
||||
<AppProvider>
|
||||
<BrowserRouter basename="/webui">
|
||||
<Routes>
|
||||
<Route path="/" element={<Layout />}>
|
||||
<Route index element={<Dashboard />} />
|
||||
<Route path="chat" element={<Chat />} />
|
||||
<Route path="logs" element={<Logs />} />
|
||||
<Route path="skills" element={<Skills />} />
|
||||
<Route path="config" element={<Config />} />
|
||||
<Route path="cron" element={<Cron />} />
|
||||
<Route path="nodes" element={<Nodes />} />
|
||||
<Route path="memory" element={<Memory />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
<UIProvider>
|
||||
<BrowserRouter basename="/webui">
|
||||
<Routes>
|
||||
<Route path="/" element={<Layout />}>
|
||||
<Route index element={<Dashboard />} />
|
||||
<Route path="chat" element={<Chat />} />
|
||||
<Route path="logs" element={<Logs />} />
|
||||
<Route path="skills" element={<Skills />} />
|
||||
<Route path="config" element={<Config />} />
|
||||
<Route path="cron" element={<Cron />} />
|
||||
<Route path="nodes" element={<Nodes />} />
|
||||
<Route path="memory" element={<Memory />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</UIProvider>
|
||||
</AppProvider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user