From e8bbdc9749b13aa3aa1d6047d7136e66314b7c48 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 23 Jun 2022 09:21:26 -0700 Subject: Add external map links --- modern/src/common/components/BottomMenu.js | 2 +- modern/src/main/StatusCard.js | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'modern') diff --git a/modern/src/common/components/BottomMenu.js b/modern/src/common/components/BottomMenu.js index 274c4f1a..282ae69e 100644 --- a/modern/src/common/components/BottomMenu.js +++ b/modern/src/common/components/BottomMenu.js @@ -92,7 +92,7 @@ const BottomMenu = () => { ? (} />) : (} />)} - setAnchorEl(null)}> + setAnchorEl(null)}> {t('settingsUser')} diff --git a/modern/src/main/StatusCard.js b/modern/src/main/StatusCard.js index 5a65f4c7..b9237103 100644 --- a/modern/src/main/StatusCard.js +++ b/modern/src/main/StatusCard.js @@ -13,14 +13,16 @@ import { TableBody, TableRow, TableCell, + Menu, + MenuItem, } from '@mui/material'; import makeStyles from '@mui/styles/makeStyles'; import CloseIcon from '@mui/icons-material/Close'; -import PostAddIcon from '@mui/icons-material/PostAdd'; import ReplayIcon from '@mui/icons-material/Replay'; import PublishIcon from '@mui/icons-material/Publish'; import EditIcon from '@mui/icons-material/Edit'; import DeleteIcon from '@mui/icons-material/Delete'; +import InfoIcon from '@mui/icons-material/Info'; import { useTranslation } from '../common/components/LocalizationProvider'; import { formatStatus } from '../common/util/formatter'; @@ -90,6 +92,8 @@ const StatusCard = ({ deviceId, onClose }) => { const positionAttributes = usePositionAttributes(t); const [positionItems] = usePersistedState('positionItems', ['speed', 'address', 'totalDistance', 'course']); + const [anchorEl, setAnchorEl] = useState(null); + const [removing, setRemoving] = useState(false); const handleRemove = useCatch(async (removed) => { @@ -146,10 +150,10 @@ const StatusCard = ({ deviceId, onClose }) => { navigate(`/position/${position.id}`)} + onClick={(e) => setAnchorEl(e.currentTarget)} disabled={!position} > - + navigate('/replay')} @@ -179,6 +183,12 @@ const StatusCard = ({ deviceId, onClose }) => { )} + setAnchorEl(null)}> + navigate(`/position/${position.id}`)}>{t('sharedShowDetails')} + {t('linkGoogleMaps')} + {t('linkAppleMaps')} + {t('linkStreetView')} +