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,34 +91,39 @@ export function ChatDrawer(props: Props) {
borderRight: `1px solid ${theme.palette.divider}`, borderRight: `1px solid ${theme.palette.divider}`,
})} })}
> >
<IconButton <Tooltip title={team.name()} placement="right">
onClick={() => setSelectedTeam(team)} <IconButton
sx={{ onClick={() => setSelectedTeam(team)}
border: selectedTeam.settings?.key === team.settings.key ? "1px solid white" : "1px solid transparent", sx={{
borderRadius: "50%", border: selectedTeam.settings?.key === team.settings.key ? "1px solid white" : "1px solid transparent",
}} borderRadius: "50%",
> }}
<Avatar src={team.settings.avatar} /> >
</IconButton> <Avatar src={team.settings.avatar} />
<IconButton </IconButton>
onClick={openCrisp} </Tooltip>
> <Tooltip title={"Chat Assistant"} placement="right">
<RobotIcon /> <IconButton
</IconButton> onClick={openCrisp}
>
<RobotIcon />
</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 (
<IconButton <Tooltip title={t.settings?.name} key={"chat-team-"+i} placement="right">
onClick={() => setSelectedTeam(Team.create(t))} <IconButton
sx={{ onClick={() => setSelectedTeam(Team.create(t))}
border: selectedTeam.key() === t.settings?.key ? "1px solid white" : "1px solid transparent", sx={{
borderRadius: "50%", border: selectedTeam.key() === t.settings?.key ? "1px solid white" : "1px solid transparent",
}} borderRadius: "50%",
key={"chat-team-"+i} }}
> >
<Avatar src={t.settings?.avatar} /> <Avatar src={t.settings?.avatar} />
</IconButton> </IconButton>
</Tooltip>
) )
})} })}
</Box> </Box>