hidden note styles
This commit is contained in:
parent
01c15c30a4
commit
152970288d
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user