Fix authentication page on mobile devices
This commit is contained in:
parent
513692fef5
commit
1f6f7c4bb4
10 changed files with 94 additions and 80 deletions
|
@ -6,7 +6,7 @@ import ResetPasswordContainer from '@/components/auth/ResetPasswordContainer';
|
|||
import LoginCheckpointContainer from '@/components/auth/LoginCheckpointContainer';
|
||||
|
||||
export default ({ match }: RouteComponentProps) => (
|
||||
<div className={'mt-32'}>
|
||||
<div className={'mt-8 xl:mt-32'}>
|
||||
<Route path={`${match.path}/login`} component={LoginContainer} exact/>
|
||||
<Route path={`${match.path}/login/checkpoint`} component={LoginCheckpointContainer}/>
|
||||
<Route path={`${match.path}/password`} component={ForgotPasswordContainer} exact/>
|
||||
|
|
|
@ -10,13 +10,11 @@ export default ({ location }: RouteComponentProps) => (
|
|||
<React.Fragment>
|
||||
<NavigationBar/>
|
||||
<TransitionRouter>
|
||||
<div className={'w-full mx-auto'} style={{ maxWidth: '1200px' }}>
|
||||
<Switch location={location}>
|
||||
<Route path={'/'} component={DashboardContainer} exact/>
|
||||
<Route path={'/account'} component={AccountOverviewContainer}/>
|
||||
<Route path={'/design'} component={DesignElementsContainer}/>
|
||||
</Switch>
|
||||
</div>
|
||||
<Switch location={location}>
|
||||
<Route path={'/'} component={DashboardContainer} exact/>
|
||||
<Route path={'/account'} component={AccountOverviewContainer}/>
|
||||
<Route path={'/design'} component={DesignElementsContainer}/>
|
||||
</Switch>
|
||||
</TransitionRouter>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { lazy, useEffect } from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { NavLink, Route, RouteComponentProps, Switch } from 'react-router-dom';
|
||||
import NavigationBar from '@/components/NavigationBar';
|
||||
import ServerConsole from '@/components/server/ServerConsole';
|
||||
|
@ -12,8 +12,6 @@ import FileManagerContainer from '@/components/server/files/FileManagerContainer
|
|||
import { CSSTransition } from 'react-transition-group';
|
||||
import SuspenseSpinner from '@/components/elements/SuspenseSpinner';
|
||||
import FileEditContainer from '@/components/server/files/FileEditContainer';
|
||||
import UsersContainer from '@/components/server/users/UsersContainer';
|
||||
import ScheduleContainer from '@/components/server/schedules/ScheduleContainer';
|
||||
import SettingsContainer from '@/components/server/settings/SettingsContainer';
|
||||
|
||||
const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>) => {
|
||||
|
@ -32,48 +30,44 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
|
|||
<NavigationBar/>
|
||||
<CSSTransition timeout={250} classNames={'fade'} appear={true} in={true}>
|
||||
<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> */}
|
||||
{/* <NavLink to={`${match.url}/schedules`}>Schedules</NavLink> */}
|
||||
<NavLink to={`${match.url}/settings`}>Settings</NavLink>
|
||||
</div>
|
||||
<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> */}
|
||||
{/* <NavLink to={`${match.url}/schedules`}>Schedules</NavLink> */}
|
||||
<NavLink to={`${match.url}/settings`}>Settings</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</CSSTransition>
|
||||
<Provider store={ServerContext.useStore()}>
|
||||
<WebsocketHandler/>
|
||||
<TransitionRouter>
|
||||
<div className={'w-full mx-auto px-3'} style={{ maxWidth: '1200px' }}>
|
||||
{!server ?
|
||||
<div className={'flex justify-center m-20'}>
|
||||
<Spinner size={'large'}/>
|
||||
</div>
|
||||
:
|
||||
<React.Fragment>
|
||||
<Switch location={location}>
|
||||
<Route path={`${match.path}`} component={ServerConsole} exact/>
|
||||
<Route path={`${match.path}/files`} component={FileManagerContainer} exact/>
|
||||
<Route
|
||||
path={`${match.path}/files/:action(edit|new)`}
|
||||
render={props => (
|
||||
<SuspenseSpinner>
|
||||
<FileEditContainer {...props as any}/>
|
||||
</SuspenseSpinner>
|
||||
)}
|
||||
exact
|
||||
/>
|
||||
<Route path={`${match.path}/databases`} component={DatabasesContainer} exact/>
|
||||
{/* <Route path={`${match.path}/users`} component={UsersContainer} exact/> */}
|
||||
{/* <Route path={`${match.path}/schedules`} component={ScheduleContainer} exact/> */}
|
||||
<Route path={`${match.path}/settings`} component={SettingsContainer} exact/>
|
||||
</Switch>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
{!server ?
|
||||
<div className={'flex justify-center m-20'}>
|
||||
<Spinner size={'large'}/>
|
||||
</div>
|
||||
:
|
||||
<React.Fragment>
|
||||
<Switch location={location}>
|
||||
<Route path={`${match.path}`} component={ServerConsole} exact/>
|
||||
<Route path={`${match.path}/files`} component={FileManagerContainer} exact/>
|
||||
<Route
|
||||
path={`${match.path}/files/:action(edit|new)`}
|
||||
render={props => (
|
||||
<SuspenseSpinner>
|
||||
<FileEditContainer {...props as any}/>
|
||||
</SuspenseSpinner>
|
||||
)}
|
||||
exact
|
||||
/>
|
||||
<Route path={`${match.path}/databases`} component={DatabasesContainer} exact/>
|
||||
{/* <Route path={`${match.path}/users`} component={UsersContainer} exact/> */}
|
||||
{/* <Route path={`${match.path}/schedules`} component={ScheduleContainer} exact/> */}
|
||||
<Route path={`${match.path}/settings`} component={SettingsContainer} exact/>
|
||||
</Switch>
|
||||
</React.Fragment>
|
||||
}
|
||||
</TransitionRouter>
|
||||
</Provider>
|
||||
</React.Fragment>
|
||||
|
|
Reference in a new issue