hidden note styles

This commit is contained in:
Alejandro Gomez 2023-01-28 19:51:08 +01:00
parent 01c15c30a4
commit 152970288d
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
3 changed files with 16 additions and 5 deletions

View File

@ -181,3 +181,16 @@
.light .note.active>.footer>.reaction-pill.reacted {
color: var(--highlight);
}
.hidden-note .header {
display: flex;
align-items: center;
}
.card.note.hidden-note {
min-height: unset;
}
.hidden-note button {
max-height: 30px;
}

View File

@ -30,7 +30,7 @@ export interface NoteProps {
const HiddenNote = ({ children }: any) => {
const [show, setShow] = useState(false)
return show ? children : (
<div className="card">
<div className="card note hidden-note">
<div className="header">
<p>
This note was hidden because of your moderation settings

View File

@ -20,8 +20,6 @@ export default function NoteReaction(props: NoteReactionProps) {
const { ["data-ev"]: dataEv, data } = props;
const ev = useMemo(() => dataEv || new NEvent(data), [data, dataEv])
const { isMuted } = useModeration();
const pRef = data?.tags.find((a: any) => a[0] === "p")?.at(1);
const isRefMuted = pRef && isMuted(pRef)
const refEvent = useMemo(() => {
if (ev) {
@ -53,13 +51,13 @@ export default function NoteReaction(props: NoteReactionProps) {
}
const root = extractRoot();
const isOpMuted = root && isMuted(root.pubkey)
const opt = {
showHeader: ev?.Kind === EventKind.Repost,
showFooter: false,
};
const isOpMuted = root && isMuted(root.pubkey)
return isOpMuted || isRefMuted ? null : (
return isOpMuted ? null : (
<div className="reaction">
<div className="header flex">
<ProfileImage pubkey={ev.RootPubKey} />