ensure the indicator is not shown above the app header

This commit is contained in:
Athou
2026-02-22 11:47:13 +01:00
parent 8fe2d0bc0e
commit c9a7b9e17c

View File

@@ -8,6 +8,10 @@ const useStyles = tss.create(() => ({
// for some reason, mantine Badge has "cursor: 'default'" // for some reason, mantine Badge has "cursor: 'default'"
cursor: "inherit", cursor: "inherit",
}, },
indicator: {
// ensure the indicator is not shown above the app header
zIndex: 0,
},
})) }))
export function UnreadCount( export function UnreadCount(
@@ -23,7 +27,15 @@ export function UnreadCount(
const count = props.unreadCount >= 10000 ? "10k+" : props.unreadCount const count = props.unreadCount >= 10000 ? "10k+" : props.unreadCount
return ( return (
<Tooltip label={props.unreadCount} disabled={props.unreadCount === count} openDelay={Constants.tooltip.delay}> <Tooltip label={props.unreadCount} disabled={props.unreadCount === count} openDelay={Constants.tooltip.delay}>
<Indicator disabled={!props.showIndicator} size={4} offset={10} position="middle-start"> <Indicator
disabled={!props.showIndicator}
size={4}
offset={10}
position="middle-start"
classNames={{
indicator: classes.indicator,
}}
>
<Badge className={`${classes.badge} cf-badge`} variant="light" fullWidth> <Badge className={`${classes.badge} cf-badge`} variant="light" fullWidth>
{count} {count}
</Badge> </Badge>