Merge pull request #4824 from h3poteto/fix/minimized-badge

Fix unread badges in minimized sidebar
This commit is contained in:
AkiraFukushima 2024-02-01 00:01:22 +09:00 committed by GitHub
commit c43d5979d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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"