diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-06-21 14:12:26 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-06-21 14:12:26 -0500 |
| commit | 59d6c3e946e386d625cb35a6c105e5cffbdea8ca (patch) | |
| tree | 94c96b34878a21827057221b08b82c236d6ee6f3 /src/web | |
| parent | 651d94a28ddced7e65c005448dabce7075505625 (diff) | |
| download | slskd-59d6c3e946e386d625cb35a6c105e5cffbdea8ca.tar.gz | |
routing for dashboard, make primary landing page
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/App.jsx | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/web/src/components/App.jsx b/src/web/src/components/App.jsx index 9839bf35..3fbaa468 100644 --- a/src/web/src/components/App.jsx +++ b/src/web/src/components/App.jsx @@ -13,6 +13,7 @@ import AppContext from './AppContext'; import AppFooter from './AppFooter'; import Browse from './Browse/Browse'; import Chat from './Chat/Chat'; +import Dashboard from './Dashboard/Dashboard'; import LoginForm from './LoginForm'; import Rooms from './Rooms/Rooms'; import Searches from './Search/Searches'; @@ -398,6 +399,12 @@ class App extends Component { </Menu.Item> ) : ( <> + <Link to={`${urlBase}/dashboard`}> + <Menu.Item> + <Icon name="chart bar" /> + Dashboard + </Menu.Item> + </Link> <Link to={`${urlBase}/searches`}> <Menu.Item> <Icon name="search" /> @@ -574,6 +581,19 @@ class App extends Component { ) : ( <Switch> <Route + path={`${urlBase}/dashboard`} + render={(props) => + this.withTokenCheck( + <div className="view"> + <Dashboard + server={applicationState.server} + {...props} + /> + </div>, + ) + } + /> + <Route path={`${urlBase}/searches/:id?`} render={(props) => this.withTokenCheck( @@ -657,7 +677,7 @@ class App extends Component { /> <Redirect from="*" - to={`${urlBase}/searches`} + to={`${urlBase}/dashboard`} /> </Switch> )} |
