address review comments

This commit is contained in:
Alejandro Gomez 2023-01-19 11:57:07 +01:00
parent dc80462740
commit 00b54d6641
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
6 changed files with 38 additions and 5 deletions

View File

@ -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

View File

@ -1,5 +1,4 @@
.note-invoice {
background: var(--note-bg);
border: 1px solid var(--font-secondary-color);
border-radius: 16px;
padding: 12px;

View File

@ -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;

View 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;
}

View 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

View File

@ -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>
)
}