diff options
author | Anton Tananaev <anton@traccar.org> | 2024-01-16 20:45:27 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-01-16 20:45:27 -0800 |
commit | 7a746c024efaf0bce40a74c7b6cca63d067379be (patch) | |
tree | 5d4f24da30a8b8098d9fa1e554ce38002eb0eb4b /modern/src | |
parent | 1c8c5142064478353a7e31fbf144bbd60b1c529d (diff) | |
download | trackermap-web-7a746c024efaf0bce40a74c7b6cca63d067379be.tar.gz trackermap-web-7a746c024efaf0bce40a74c7b6cca63d067379be.tar.bz2 trackermap-web-7a746c024efaf0bce40a74c7b6cca63d067379be.zip |
Disallow device re-sharing
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/common/components/StatusCard.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/common/components/StatusCard.jsx b/modern/src/common/components/StatusCard.jsx index b4660d61..c6eec3ca 100644 --- a/modern/src/common/components/StatusCard.jsx +++ b/modern/src/common/components/StatusCard.jsx @@ -123,6 +123,7 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin const deviceReadonly = useDeviceReadonly(); + const user = useSelector((state) => state.session.user); const device = useSelector((state) => state.devices.items[deviceId]); const deviceImage = device?.attributes?.deviceImage; @@ -289,7 +290,7 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin <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> - <MenuItem onClick={handleShare}>{t('deviceShare')}</MenuItem> + {!user.temporary && <MenuItem onClick={handleShare}>{t('deviceShare')}</MenuItem>} </Menu> )} <RemoveDialog |