aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other
diff options
context:
space:
mode:
authorJamie Guthrie <jamie.guthrie@gmail.com>2023-08-16 18:58:52 +0200
committerJamie Guthrie <jamie.guthrie@gmail.com>2023-08-16 18:58:52 +0200
commit62ae7d516525bba2c2d053832ece7d613be86dc9 (patch)
tree0981f89ddc1386e1021a77b2e933e176423fe995 /modern/src/other
parent348b8ea777ed7695f50db430fbff6a1c59938c54 (diff)
downloadtrackermap-web-62ae7d516525bba2c2d053832ece7d613be86dc9.tar.gz
trackermap-web-62ae7d516525bba2c2d053832ece7d613be86dc9.tar.bz2
trackermap-web-62ae7d516525bba2c2d053832ece7d613be86dc9.zip
Add tooltips
Diffstat (limited to 'modern/src/other')
-rw-r--r--modern/src/other/GeofencesList.js4
-rw-r--r--modern/src/other/GeofencesPage.js5
2 files changed, 7 insertions, 2 deletions
diff --git a/modern/src/other/GeofencesList.js b/modern/src/other/GeofencesList.js
index d26eff09..a7858ce5 100644
--- a/modern/src/other/GeofencesList.js
+++ b/modern/src/other/GeofencesList.js
@@ -8,6 +8,7 @@ import {
import { geofencesActions } from '../store';
import CollectionActions from '../settings/components/CollectionActions';
import { useCatchCallback } from '../reactHelper';
+import { useTranslation } from '../common/components/LocalizationProvider';
const useStyles = makeStyles(() => ({
list: {
@@ -24,6 +25,7 @@ const useStyles = makeStyles(() => ({
const GeofencesList = ({ onGeofenceSelected }) => {
const classes = useStyles();
const dispatch = useDispatch();
+ const t = useTranslation();
const items = useSelector((state) => state.geofences.items);
@@ -42,7 +44,7 @@ const GeofencesList = ({ onGeofenceSelected }) => {
<Fragment key={item.id}>
<ListItemButton key={item.id} onClick={() => onGeofenceSelected(item.id)}>
<ListItemText primary={item.name} />
- <CollectionActions itemId={item.id} editPath="/settings/geofence" endpoint="geofences" setTimestamp={refreshGeofences} />
+ <CollectionActions itemId={item.id} editPath="/settings/geofence" endpoint="geofences" collectionTitle={t('sharedGeofence')} setTimestamp={refreshGeofences} />
</ListItemButton>
{index < list.length - 1 ? <Divider /> : null}
</Fragment>
diff --git a/modern/src/other/GeofencesPage.js b/modern/src/other/GeofencesPage.js
index 6ce7ae8e..cbbf3d40 100644
--- a/modern/src/other/GeofencesPage.js
+++ b/modern/src/other/GeofencesPage.js
@@ -3,6 +3,7 @@ import { useDispatch } from 'react-redux';
import {
Divider, Typography, IconButton, useMediaQuery, Toolbar,
} from '@mui/material';
+import Tooltip from '@mui/material/Tooltip';
import makeStyles from '@mui/styles/makeStyles';
import { useTheme } from '@mui/material/styles';
import Drawer from '@mui/material/Drawer';
@@ -117,7 +118,9 @@ const GeofencesPage = () => {
<label htmlFor="upload-gpx">
<input accept=".gpx" id="upload-gpx" type="file" className={classes.fileInput} onChange={handleFile} />
<IconButton edge="end" component="span" onClick={() => {}}>
- <UploadFileIcon />
+ <Tooltip title={t('sharedUploadGeofence')} enterDelay={500} enterNextDelay={500}>
+ <UploadFileIcon />
+ </Tooltip>
</IconButton>
</label>
</Toolbar>