mirror of
https://github.com/traccar/traccar-web.git
synced 2025-01-07 03:26:42 +08:00
More details in the list
This commit is contained in:
parent
62d85d9dd3
commit
1822e09c51
@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useNavigate, Link as RouterLink } from 'react-router-dom';
|
||||
import Draggable from 'react-draggable';
|
||||
import {
|
||||
Card,
|
||||
@ -15,6 +15,8 @@ import {
|
||||
Menu,
|
||||
MenuItem,
|
||||
CardMedia,
|
||||
TableFooter,
|
||||
Link,
|
||||
} from '@mui/material';
|
||||
import makeStyles from '@mui/styles/makeStyles';
|
||||
import CloseIcon from '@mui/icons-material/Close';
|
||||
@ -223,7 +225,17 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin
|
||||
)}
|
||||
/>
|
||||
))}
|
||||
|
||||
</TableBody>
|
||||
<TableFooter>
|
||||
<TableRow>
|
||||
<TableCell colSpan={2} className={classes.cell}>
|
||||
<Typography variant="body2">
|
||||
<Link component={RouterLink} underline="none" to={`/position/${position.id}`}>{t('sharedShowDetails')}</Link>
|
||||
</Typography>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableFooter>
|
||||
</Table>
|
||||
</CardContent>
|
||||
)}
|
||||
@ -267,13 +279,14 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin
|
||||
</div>
|
||||
{position && (
|
||||
<Menu anchorEl={anchorEl} open={Boolean(anchorEl)} onClose={() => setAnchorEl(null)}>
|
||||
<MenuItem onClick={() => navigate(`/position/${position.id}`)}><Typography color="secondary">{t('sharedShowDetails')}</Typography></MenuItem>
|
||||
<MenuItem onClick={handleGeofence}>{t('sharedCreateGeofence')}</MenuItem>
|
||||
<MenuItem component="a" target="_blank" href={`https://www.google.com/maps/search/?api=1&query=${position.latitude}%2C${position.longitude}`}>{t('linkGoogleMaps')}</MenuItem>
|
||||
<MenuItem component="a" target="_blank" href={`http://maps.apple.com/?ll=${position.latitude},${position.longitude}`}>{t('linkAppleMaps')}</MenuItem>
|
||||
<MenuItem component="a" target="_blank" href={`https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=${position.latitude}%2C${position.longitude}&heading=${position.course}`}>{t('linkStreetView')}</MenuItem>
|
||||
{navigationAppTitle && <MenuItem component="a" target="_blank" href={navigationAppLink.replace('{latitude}', position.latitude).replace('{longitude}', position.longitude)}>{navigationAppTitle}</MenuItem>}
|
||||
{!shareDisabled && !user.temporary && <MenuItem onClick={() => navigate(`/settings/device/${deviceId}/share`)}>{t('deviceShare')}</MenuItem>}
|
||||
{!shareDisabled && !user.temporary && (
|
||||
<MenuItem onClick={() => navigate(`/settings/device/${deviceId}/share`)}><Typography color="secondary">{t('deviceShare')}</Typography></MenuItem>
|
||||
)}
|
||||
</Menu>
|
||||
)}
|
||||
<RemoveDialog
|
||||
|
Loading…
Reference in New Issue
Block a user