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/main/StatusCard.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'modern/src/main/StatusCard.js') 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')} +