Unclutter notifications view

This commit is contained in:
hzrd149
2024-10-03 12:36:24 -05:00
parent 38bc52b4c9
commit e0e2ed9724
3 changed files with 18 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
---
"nostrudel": minor
---
Unclutter notifications view

View File

@@ -84,11 +84,14 @@ const NotificationIconEntry = memo(
bg={!read ? focusColor : undefined} bg={!read ? focusColor : undefined}
ref={headerRef} ref={headerRef}
overflow="hidden" overflow="hidden"
_hover={{ backgroundColor: "var(--chakra-colors-card-hover-overlay)" }}
> >
<Box>{icon}</Box> <Box>{icon}</Box>
<UserAvatar pubkey={pubkey} size="sm" /> <UserAvatar pubkey={pubkey} hideFrom="md" size="sm" />
<UserName pubkey={pubkey} hideBelow="md" /> <UserName pubkey={pubkey} hideBelow="md" />
<Text isTruncated>{summary}</Text> <Text isTruncated color={read ? "GrayText" : undefined}>
{summary}
</Text>
<Spacer /> <Spacer />
{read && <CheckIcon boxSize={5} color="green.500" />} {read && <CheckIcon boxSize={5} color="green.500" />}
<Timestamp timestamp={timestamp} whiteSpace="pre" /> <Timestamp timestamp={timestamp} whiteSpace="pre" />

View File

@@ -69,7 +69,7 @@ const ReplyNotification = forwardRef<HTMLDivElement, { event: NostrEvent; onClic
return ( return (
<NotificationIconEntry <NotificationIconEntry
ref={ref} ref={ref}
icon={<ReplyIcon boxSize={8} color="green.400" />} icon={<ReplyIcon boxSize={6} color="green.400" />}
id={event.id} id={event.id}
pubkey={event.pubkey} pubkey={event.pubkey}
timestamp={event.created_at} timestamp={event.created_at}
@@ -101,7 +101,7 @@ const MentionNotification = forwardRef<HTMLDivElement, { event: NostrEvent; onCl
return ( return (
<NotificationIconEntry <NotificationIconEntry
ref={ref} ref={ref}
icon={<AtIcon boxSize={8} color="purple.400" />} icon={<AtIcon boxSize={6} color="purple.400" />}
id={event.id} id={event.id}
pubkey={event.pubkey} pubkey={event.pubkey}
timestamp={event.created_at} timestamp={event.created_at}
@@ -122,7 +122,7 @@ const RepostNotification = forwardRef<HTMLDivElement, { event: NostrEvent; onCli
return ( return (
<NotificationIconEntry <NotificationIconEntry
ref={ref} ref={ref}
icon={<RepostIcon boxSize={8} color="blue.400" />} icon={<RepostIcon boxSize={6} color="blue.400" />}
id={event.id} id={event.id}
pubkey={event.pubkey} pubkey={event.pubkey}
timestamp={event.created_at} timestamp={event.created_at}
@@ -150,14 +150,16 @@ const ReactionNotification = forwardRef<HTMLDivElement, { event: NostrEvent; onC
return ( return (
<NotificationIconEntry <NotificationIconEntry
ref={ref} ref={ref}
icon={<Heart boxSize={8} color="red.400" />} icon={<Heart boxSize={6} color="red.400" />}
id={event.id} id={event.id}
pubkey={event.pubkey} pubkey={event.pubkey}
timestamp={event.created_at} timestamp={event.created_at}
summary={ summary={
<> <>
<ReactionIcon emoji={event.content} /> <ReactionIcon emoji={event.content} />
{reactedEvent?.content} <Text fontStyle="italic" as="span" ml="2" mr="2" fontSize="sm">
{reactedEvent?.content}
</Text>
</> </>
} }
onClick={onClick} onClick={onClick}
@@ -207,7 +209,7 @@ const ZapNotification = forwardRef<HTMLDivElement, { event: NostrEvent; onClick?
return ( return (
<NotificationIconEntry <NotificationIconEntry
ref={ref} ref={ref}
icon={<LightningIcon boxSize={8} color="yellow.400" />} icon={<LightningIcon boxSize={6} color="yellow.400" />}
id={event.id} id={event.id}
pubkey={zap.request.pubkey} pubkey={zap.request.pubkey}
timestamp={zap.request.created_at} timestamp={zap.request.created_at}