diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-07 17:21:34 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-07 17:21:34 -0700 |
commit | e85106252ec9f4707176e299a7c42c49ccd68632 (patch) | |
tree | a1c5077d9f96a926ec2f56f7e30262e396ac13b8 /modern/src/components | |
parent | 9cafcd3288430dc8c26cd0c31cafb73af8a5e229 (diff) | |
download | trackermap-web-e85106252ec9f4707176e299a7c42c49ccd68632.tar.gz trackermap-web-e85106252ec9f4707176e299a7c42c49ccd68632.tar.bz2 trackermap-web-e85106252ec9f4707176e299a7c42c49ccd68632.zip |
Make modern app the default
Diffstat (limited to 'modern/src/components')
-rw-r--r-- | modern/src/components/registration/LoginForm.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index 39a0d4c7..11847d3e 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -1,8 +1,9 @@ import React, { useState } from 'react'; import { - Grid, useMediaQuery, makeStyles, InputLabel, Select, MenuItem, FormControl, Button, TextField, Link, Snackbar, IconButton, + Grid, useMediaQuery, makeStyles, InputLabel, Select, MenuItem, FormControl, Button, TextField, Link, Snackbar, IconButton, Tooltip, } from '@material-ui/core'; import CloseIcon from '@material-ui/icons/Close'; +import CachedIcon from '@material-ui/icons/Cached'; import { useTheme } from '@material-ui/core/styles'; import { useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; @@ -12,6 +13,11 @@ import StartPage from '../../StartPage'; import usePersistedState from '../../common/usePersistedState'; const useStyles = makeStyles((theme) => ({ + legacy: { + position: 'absolute', + top: theme.spacing(1), + right: theme.spacing(1), + }, logoContainer: { textAlign: 'center', color: theme.palette.primary.main, @@ -66,6 +72,11 @@ const LoginForm = () => { return ( <StartPage> + <Tooltip title="Switch to Legacy App" className={classes.legacy}> + <IconButton onClick={() => window.localStorage.setItem('legacyApp', true) || window.location.replace('/')}> + <CachedIcon /> + </IconButton> + </Tooltip> <Grid container direction="column" spacing={2}> {useMediaQuery(theme.breakpoints.down('md')) && ( |