diff options
author | Anton Tananaev <anton@traccar.org> | 2023-01-15 18:10:15 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-01-15 18:10:15 -0800 |
commit | ee7c240d648e0efc760188c3357658f9db220ede (patch) | |
tree | 62128634f3fa8b5ee7b6e2e5946e32fafc0090a3 /modern/src/main | |
parent | 4290739f81aaed0a56fc5f575f558e5339b2ccf9 (diff) | |
download | trackermap-web-ee7c240d648e0efc760188c3357658f9db220ede.tar.gz trackermap-web-ee7c240d648e0efc760188c3357658f9db220ede.tar.bz2 trackermap-web-ee7c240d648e0efc760188c3357658f9db220ede.zip |
First device tooltip
Diffstat (limited to 'modern/src/main')
-rw-r--r-- | modern/src/main/MainToolbar.js | 6 |
1 files changed, 4 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> ); |