aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-01-15 18:10:15 -0800
committerAnton Tananaev <anton@traccar.org>2023-01-15 18:10:15 -0800
commitee7c240d648e0efc760188c3357658f9db220ede (patch)
tree62128634f3fa8b5ee7b6e2e5946e32fafc0090a3 /modern/src
parent4290739f81aaed0a56fc5f575f558e5339b2ccf9 (diff)
downloadtrackermap-web-ee7c240d648e0efc760188c3357658f9db220ede.tar.gz
trackermap-web-ee7c240d648e0efc760188c3357658f9db220ede.tar.bz2
trackermap-web-ee7c240d648e0efc760188c3357658f9db220ede.zip
First device tooltip
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/main/MainToolbar.js6
-rw-r--r--modern/src/resources/l10n/en.json1
2 files changed, 5 insertions, 2 deletions
diff --git a/modern/src/main/MainToolbar.js b/modern/src/main/MainToolbar.js
index 859aa218..caba2410 100644
--- a/modern/src/main/MainToolbar.js
+++ b/modern/src/main/MainToolbar.js
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
import { useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom';
import {
- Toolbar, IconButton, OutlinedInput, InputAdornment, Popover, FormControl, InputLabel, Select, MenuItem, FormGroup, FormControlLabel, Checkbox, Badge, ListItemButton, ListItemText,
+ Toolbar, IconButton, OutlinedInput, InputAdornment, Popover, FormControl, InputLabel, Select, MenuItem, FormGroup, FormControlLabel, Checkbox, Badge, ListItemButton, ListItemText, Tooltip,
} from '@mui/material';
import { makeStyles, useTheme } from '@mui/styles';
import MapIcon from '@mui/icons-material/Map';
@@ -167,7 +167,9 @@ const MainToolbar = ({
</div>
</Popover>
<IconButton edge="end" onClick={() => navigate('/settings/device')} disabled={deviceReadonly}>
- <AddIcon />
+ <Tooltip open={Object.keys(devices).length === 0} title={t('deviceRegisterFirst')} arrow>
+ <AddIcon />
+ </Tooltip>
</IconButton>
</Toolbar>
);
diff --git a/modern/src/resources/l10n/en.json b/modern/src/resources/l10n/en.json
index 7a7c5516..c58e607f 100644
--- a/modern/src/resources/l10n/en.json
+++ b/modern/src/resources/l10n/en.json
@@ -200,6 +200,7 @@
"deviceStatusOnline": "Online",
"deviceStatusOffline": "Offline",
"deviceStatusUnknown": "Unknown",
+ "deviceRegisterFirst": "Register your first device",
"groupDialog": "Group",
"groupParent": "Group",
"groupNoGroup": "No Group",