added tooltips for the icons in the chat menu

This commit is contained in:
Carter 2026-02-25 15:19:58 -06:00
parent baf59a2b78
commit 9ab1d530e7

View file

@ -1,5 +1,5 @@
import { ChevronRight } from "@mui/icons-material"; import { ChevronRight } from "@mui/icons-material";
import { Avatar, Box, Divider, Drawer, IconButton, Theme, Typography } from "@mui/material"; import { Avatar, Box, Divider, Drawer, IconButton, Theme, Tooltip, Typography } from "@mui/material";
import { makeStyles } from "@mui/styles"; import { makeStyles } from "@mui/styles";
import { useMobile } from "hooks"; import { useMobile } from "hooks";
import { Team } from "models"; import { Team } from "models";
@ -91,6 +91,7 @@ export function ChatDrawer(props: Props) {
borderRight: `1px solid ${theme.palette.divider}`, borderRight: `1px solid ${theme.palette.divider}`,
})} })}
> >
<Tooltip title={team.name()} placement="right">
<IconButton <IconButton
onClick={() => setSelectedTeam(team)} onClick={() => setSelectedTeam(team)}
sx={{ sx={{
@ -100,25 +101,29 @@ export function ChatDrawer(props: Props) {
> >
<Avatar src={team.settings.avatar} /> <Avatar src={team.settings.avatar} />
</IconButton> </IconButton>
</Tooltip>
<Tooltip title={"Chat Assistant"} placement="right">
<IconButton <IconButton
onClick={openCrisp} onClick={openCrisp}
> >
<RobotIcon /> <RobotIcon />
</IconButton> </IconButton>
</Tooltip>
<Box width={"100%"} borderBottom={"1px solid grey"} /> <Box width={"100%"} borderBottom={"1px solid grey"} />
{teams.map((t, i)=> { {teams.map((t, i)=> {
if (t.settings?.key === team.key()) return null; if (t.settings?.key === team.key()) return null;
return ( return (
<Tooltip title={t.settings?.name} key={"chat-team-"+i} placement="right">
<IconButton <IconButton
onClick={() => setSelectedTeam(Team.create(t))} onClick={() => setSelectedTeam(Team.create(t))}
sx={{ sx={{
border: selectedTeam.key() === t.settings?.key ? "1px solid white" : "1px solid transparent", border: selectedTeam.key() === t.settings?.key ? "1px solid white" : "1px solid transparent",
borderRadius: "50%", borderRadius: "50%",
}} }}
key={"chat-team-"+i}
> >
<Avatar src={t.settings?.avatar} /> <Avatar src={t.settings?.avatar} />
</IconButton> </IconButton>
</Tooltip>
) )
})} })}
</Box> </Box>