refine territory mutes

This commit is contained in:
keyan 2023-12-31 10:52:19 -06:00
parent 76b63240db
commit 240ac3497d
3 changed files with 4 additions and 3 deletions

View File

@ -169,6 +169,7 @@ export default function Comment ({
className={`${itemStyles.other} ${styles.other}`} className={`${itemStyles.other} ${styles.other}`}
embellishUser={op && <><span> </span><Badge bg={op === 'fwd' ? 'secondary' : 'boost'} className={`${styles.op} bg-opacity-75`}>{op}</Badge></>} embellishUser={op && <><span> </span><Badge bg={op === 'fwd' ? 'secondary' : 'boost'} className={`${styles.op} bg-opacity-75`}>{op}</Badge></>}
onQuoteReply={quoteReply} onQuoteReply={quoteReply}
nested={!includeParent}
extraInfo={ extraInfo={
<> <>
{includeParent && <Parent item={item} rootText={rootText} />} {includeParent && <Parent item={item} rootText={rootText} />}

View File

@ -25,7 +25,7 @@ import { MuteSubDropdownItem } from './territory-header'
export default function ItemInfo ({ export default function ItemInfo ({
item, full, commentsText = 'comments', item, full, commentsText = 'comments',
commentTextSingular = 'comment', className, embellishUser, extraInfo, onEdit, editText, commentTextSingular = 'comment', className, embellishUser, extraInfo, onEdit, editText,
onQuoteReply, nofollow, extraBadges onQuoteReply, nofollow, extraBadges, nested
}) { }) {
const editThreshold = new Date(item.createdAt).getTime() + 10 * 60000 const editThreshold = new Date(item.createdAt).getTime() + 10 * 60000
const me = useMe() const me = useMe()
@ -169,7 +169,7 @@ export default function ItemInfo ({
<hr className='dropdown-divider' /> <hr className='dropdown-divider' />
<OutlawDropdownItem item={item} /> <OutlawDropdownItem item={item} />
</>} </>}
{me && !item.mine && sub && Number(me.id) !== Number(sub.userId) && {me && !nested && !item.mine && sub && Number(me.id) !== Number(sub.userId) &&
<> <>
<hr className='dropdown-divider' /> <hr className='dropdown-divider' />
<MuteSubDropdownItem item={item} sub={sub} /> <MuteSubDropdownItem item={item} sub={sub} />

View File

@ -41,7 +41,7 @@ export default function TerritoryHeader ({ sub }) {
<small className='text-muted fw-bold align-items-center d-flex'> <small className='text-muted fw-bold align-items-center d-flex'>
territory details territory details
{sub.status === 'STOPPED' && <Badge className='ms-2' bg='danger'>archived</Badge>} {sub.status === 'STOPPED' && <Badge className='ms-2' bg='danger'>archived</Badge>}
{(sub.moderated || sub.moderatedCount > 0) && <Badge className='ms-2' bg='secondary'>moderated{sub.moderatedCount && ` ${sub.moderatedCount}`}</Badge>} {(sub.moderated || sub.moderatedCount > 0) && <Badge className='ms-2' bg='secondary'>moderated{sub.moderatedCount > 0 && ` ${sub.moderatedCount}`}</Badge>}
</small> </small>
} }
> >