aboutsummaryrefslogtreecommitdiff
path: root/modern/src/main/MainToolbar.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/main/MainToolbar.js')
-rw-r--r--modern/src/main/MainToolbar.js6
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>
);