mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Add basic navigation bar to server view
This commit is contained in:
@@ -7,7 +7,7 @@ import DashboardContainer from '@/components/dashboard/DashboardContainer';
|
||||
import TransitionRouter from '@/TransitionRouter';
|
||||
|
||||
export default ({ location }: RouteComponentProps) => (
|
||||
<div>
|
||||
<React.Fragment>
|
||||
<NavigationBar/>
|
||||
<TransitionRouter>
|
||||
<div className={'w-full mx-auto'} style={{ maxWidth: '1200px' }}>
|
||||
@@ -18,5 +18,5 @@ export default ({ location }: RouteComponentProps) => (
|
||||
</Switch>
|
||||
</div>
|
||||
</TransitionRouter>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
import * as React from 'react';
|
||||
import { Route, RouteComponentProps, Switch } from 'react-router-dom';
|
||||
import { NavLink, Route, RouteComponentProps, Switch } from 'react-router-dom';
|
||||
import NavigationBar from '@/components/NavigationBar';
|
||||
import ServerConsole from '@/components/server/ServerConsole';
|
||||
import TransitionRouter from '@/TransitionRouter';
|
||||
|
||||
export default ({ location }: RouteComponentProps) => (
|
||||
<div>
|
||||
export default ({ match, location }: RouteComponentProps) => (
|
||||
<React.Fragment>
|
||||
<NavigationBar/>
|
||||
<div id={'sub-navigation'}>
|
||||
<div className={'mx-auto'} style={{ maxWidth: '1200px' }}>
|
||||
<div className={'items'}>
|
||||
<NavLink to={`${match.url}`} exact>Console</NavLink>
|
||||
<NavLink to={`${match.url}/files`}>File Manager</NavLink>
|
||||
<NavLink to={`${match.url}/databases`}>Databases</NavLink>
|
||||
<NavLink to={`${match.url}/users`}>User Management</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TransitionRouter>
|
||||
<div className={'w-full mx-auto'} style={{ maxWidth: '1200px' }}>
|
||||
<Switch location={location}>
|
||||
<Route path={`/`} component={ServerConsole} exact/>
|
||||
<Route path={`${match.path}`} component={ServerConsole} exact/>
|
||||
</Switch>
|
||||
</div>
|
||||
</TransitionRouter>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user