diff options
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/main/MainToolbar.js | 6 | ||||
-rw-r--r-- | modern/src/resources/l10n/en.json | 1 |
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", |