Highlight note in thread

This commit is contained in:
Kieran 2023-01-08 15:00:28 +00:00
parent bf5f2b1b52
commit bfc25f6ce1
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,10 @@
border-bottom: 1px solid #333; border-bottom: 1px solid #333;
} }
.note.active {
background-color: #222;
}
.note > .header > .pfp { .note > .header > .pfp {
flex-grow: 1; flex-grow: 1;
} }

View File

@ -17,6 +17,7 @@ export default function Note(props) {
const dataEvent = props["data-ev"]; const dataEvent = props["data-ev"];
const reactions = props.reactions; const reactions = props.reactions;
const deletion = props.deletion; const deletion = props.deletion;
const hightlight = props.hightlight;
const users = useSelector(s => s.users?.users); const users = useSelector(s => s.users?.users);
const ev = dataEvent ?? Event.FromObject(data); const ev = dataEvent ?? Event.FromObject(data);
@ -76,7 +77,7 @@ export default function Note(props) {
} }
return ( return (
<div className="note"> <div className={`note ${hightlight ? "active" : ""}`}>
{options.showHeader ? {options.showHeader ?
<div className="header flex"> <div className="header flex">
<ProfileImage pubkey={ev.RootPubKey} subHeader={replyTag()} /> <ProfileImage pubkey={ev.RootPubKey} subHeader={replyTag()} />