Fix unread badges in minimized sidebar

This commit is contained in:
AkiraFukushima 2024-01-31 23:17:48 +09:00
parent 4606b2c0e3
commit 1dc1adb5c1
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
2 changed files with 16 additions and 1 deletions

View File

@ -42,9 +42,24 @@
width: calc(100% - 64px);
}
.sidebar-menu-item {
position: relative;
}
.sidebar-menu-item > span {
display: none;
}
.sidebar-toolchip {
position: absolute;
top: 2px;
right: 2px;
font-size: 7px;
}
.sidebar-toolchip > div {
padding: 2px 4px;
}
}
@media screen and (max-width: 996px) {

View File

@ -92,7 +92,7 @@ export default function Layout({ children }: LayoutProps) {
<ListItemPrefix>{page.icon}</ListItemPrefix>
<span className="sidebar-menu text-ellipsis whitespace-nowrap overflow-hidden">{page.title}</span>
{page.id === 'notifications' && unreads[account?.id?.toString()] ? (
<ListItemSuffix>
<ListItemSuffix className="sidebar-toolchip">
<Chip
value={unreads[account.id.toString()]}
variant="ghost"