address review comments
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
.follows-you {
|
.follows-you {
|
||||||
color: var(--font-secondary-color);
|
color: var(--font-tertiary-color);
|
||||||
font-size: var(--font-size-tiny);
|
font-size: var(--font-size-tiny);
|
||||||
margin-left: .2em;
|
margin-left: .2em;
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
.note-invoice {
|
.note-invoice {
|
||||||
background: var(--note-bg);
|
|
||||||
border: 1px solid var(--font-secondary-color);
|
border: 1px solid var(--font-secondary-color);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
@ -72,6 +72,11 @@
|
|||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.indented .note.active:last-child {
|
||||||
|
border-bottom-right-radius: 16px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
.indented > .indented .note:last-child {
|
.indented > .indented .note:last-child {
|
||||||
border-bottom-right-radius: 0px;
|
border-bottom-right-radius: 0px;
|
||||||
margin-bottom: 0;
|
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 { useDispatch, useSelector } from "react-redux"
|
||||||
|
|
||||||
import { HexKey, RawEvent } from "../nostr";
|
import { HexKey, RawEvent } from "../nostr";
|
||||||
|
import UnreadCount from "../element/UnreadCount";
|
||||||
import ProfileImage from "../element/ProfileImage";
|
import ProfileImage from "../element/ProfileImage";
|
||||||
import { hexToBech32 } from "../Util";
|
import { hexToBech32 } from "../Util";
|
||||||
import { incDmInteraction } from "../state/Login";
|
import { incDmInteraction } from "../state/Login";
|
||||||
@ -27,9 +28,7 @@ export default function MessagesPage() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex mb10" key={chat.pubkey}>
|
<div className="flex mb10" key={chat.pubkey}>
|
||||||
<ProfileImage pubkey={chat.pubkey} className="f-grow" link={`/messages/${hexToBech32("npub", chat.pubkey)}`} />
|
<ProfileImage pubkey={chat.pubkey} className="f-grow" link={`/messages/${hexToBech32("npub", chat.pubkey)}`} />
|
||||||
<span className="pill">
|
<UnreadCount unread={chat.unreadMessages} />
|
||||||
{chat.unreadMessages}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user