mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-26 03:46:25 -08:00
added badges
This commit is contained in:
1 parent
b4a9227567
commit
0472f520ba
4 files changed
+13
-5
No files matched your search
@@ -73,6 +73,7 @@ import { livekitSupport } from '$hooks/useLivekitSupport';
|
||||
import { Presence, useUserPresence } from '$hooks/useUserPresence';
|
||||
import { AvatarPresence, PresenceBadge } from '$components/presence';
|
||||
import { RoomNavUser } from './RoomNavUser';
|
||||
import { SidebarUnreadBadge } from '$components/sidebar';
|
||||
|
||||
/**
|
||||
* Reactively checks whether a room has unread messages.
|
||||
@@ -465,6 +466,13 @@ export function RoomNavItem({
|
||||
)}
|
||||
</Avatar>
|
||||
</AvatarPresence>
|
||||
{unread && hideText && (
|
||||
<SidebarUnreadBadge
|
||||
highlight={unread.highlight > 0}
|
||||
count={unread.highlight > 0 ? unread.highlight : unread.total}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!hideText && (
|
||||
<>
|
||||
<Box as="span" grow="Yes" direction="Column">
|
||||
@@ -530,9 +538,9 @@ export function RoomNavItem({
|
||||
</NavButton>
|
||||
)}
|
||||
</TooltipProvider>
|
||||
{optionsVisible && (
|
||||
{optionsVisible && !hideText && (
|
||||
<NavItemOptions>
|
||||
{(room.isCallRoom() || (direct && callMembers.length > 0)) && !hideText && (
|
||||
{(room.isCallRoom() || (direct && callMembers.length > 0)) && (
|
||||
<TooltipProvider
|
||||
position="Bottom"
|
||||
offset={4}
|
||||
|
||||
@@ -310,7 +310,7 @@ export function Direct() {
|
||||
style={{
|
||||
position: 'relative',
|
||||
height: virtualizer.getTotalSize(),
|
||||
overflow: 'clip',
|
||||
overflow: 'visible',
|
||||
}}
|
||||
>
|
||||
{virtualizer.getVirtualItems().map((vItem) => {
|
||||
|
||||
@@ -377,7 +377,7 @@ export function Home() {
|
||||
style={{
|
||||
position: 'relative',
|
||||
height: virtualizer.getTotalSize(),
|
||||
overflow: 'clip',
|
||||
overflow: 'visible',
|
||||
}}
|
||||
>
|
||||
{virtualizer.getVirtualItems().map((vItem) => {
|
||||
|
||||
@@ -822,7 +822,7 @@ export function Space() {
|
||||
style={{
|
||||
height: virtualizer.getTotalSize(),
|
||||
position: 'relative',
|
||||
overflow: 'clip',
|
||||
overflow: 'visible',
|
||||
}}
|
||||
>
|
||||
{virtualizedItems.map((vItem) => {
|
||||
|
||||
Reference in new issue
Block a user