forked from Kieran/snort
address review comments
This commit is contained in:
parent
dc80462740
commit
00b54d6641
@ -1,5 +1,5 @@
|
||||
.follows-you {
|
||||
color: var(--font-secondary-color);
|
||||
color: var(--font-tertiary-color);
|
||||
font-size: var(--font-size-tiny);
|
||||
margin-left: .2em;
|
||||
font-weight: normal
|
||||
|
@ -1,5 +1,4 @@
|
||||
.note-invoice {
|
||||
background: var(--note-bg);
|
||||
border: 1px solid var(--font-secondary-color);
|
||||
border-radius: 16px;
|
||||
padding: 12px;
|
||||
|
@ -72,6 +72,11 @@
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.indented .note.active:last-child {
|
||||
border-bottom-right-radius: 16px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.indented > .indented .note:last-child {
|
||||
border-bottom-right-radius: 0px;
|
||||
margin-bottom: 0;
|
||||
|
19
src/element/UnreadCount.css
Normal file
19
src/element/UnreadCount.css
Normal file
@ -0,0 +1,19 @@
|
||||
.pill {
|
||||
font-size: var(--font-size-small);
|
||||
display: inline-block;
|
||||
background-color: var(--gray-tertiary);
|
||||
padding: 2px 10px;
|
||||
border-radius: 10px;
|
||||
user-select: none;
|
||||
color: var(--font-color);
|
||||
margin: 2px 5px;
|
||||
}
|
||||
|
||||
.pill.unread {
|
||||
background-color: var(--gray);
|
||||
color: var(--font-color);
|
||||
}
|
||||
|
||||
.pill:hover {
|
||||
cursor: pointer;
|
||||
}
|
11
src/element/UnreadCount.tsx
Normal file
11
src/element/UnreadCount.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import "./UnreadCount.css"
|
||||
|
||||
const UnreadCount = ({ unread }: { unread: number }) => {
|
||||
return (
|
||||
<span className={`pill ${unread > 0 ? 'unread' : ''}`}>
|
||||
{unread}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
export default UnreadCount
|
@ -2,6 +2,7 @@ import { useMemo } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux"
|
||||
|
||||
import { HexKey, RawEvent } from "../nostr";
|
||||
import UnreadCount from "../element/UnreadCount";
|
||||
import ProfileImage from "../element/ProfileImage";
|
||||
import { hexToBech32 } from "../Util";
|
||||
import { incDmInteraction } from "../state/Login";
|
||||
@ -27,9 +28,7 @@ export default function MessagesPage() {
|
||||
return (
|
||||
<div className="flex mb10" key={chat.pubkey}>
|
||||
<ProfileImage pubkey={chat.pubkey} className="f-grow" link={`/messages/${hexToBech32("npub", chat.pubkey)}`} />
|
||||
<span className="pill">
|
||||
{chat.unreadMessages}
|
||||
</span>
|
||||
<UnreadCount unread={chat.unreadMessages} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user