diff --git a/web/modals/threads/members/member.react.js b/web/modals/threads/members/member.react.js --- a/web/modals/threads/members/member.react.js +++ b/web/modals/threads/members/member.react.js @@ -42,6 +42,8 @@ function ThreadMember(props: Props): React.Node { const { memberInfo, threadInfo, setOpenMenu, isMenuOpen } = props; const userName = stringForUser(memberInfo); + const { roles } = threadInfo; + const { role } = memberInfo; const onMenuChange = React.useCallback( menuOpen => { @@ -133,14 +135,20 @@ [], ); + const roleName = role && roles[role].name; + const label = React.useMemo(() => { - if (memberIsAdmin(memberInfo, threadInfo)) { - return ; - } else if (memberHasAdminPowers(memberInfo)) { - return ; + // The parent admin is not associated to a role ID, so check for it first. + if (memberHasAdminPowers(memberInfo)) { + return ; + } + + if (roleName) { + return ; } + return null; - }, [memberInfo, threadInfo]); + }, [memberInfo, roleName]); const memberContainerClasses = classNames(css.memberContainer, { [css.memberContainerWithMenuOpen]: isMenuOpen, diff --git a/web/theme.css b/web/theme.css --- a/web/theme.css +++ b/web/theme.css @@ -223,4 +223,5 @@ --pinned-count-text-color: var(--shades-white-90); --modal-overlay-background-90: rgba(0, 0, 0, 0.9); --modal-overlay-background-80: rgba(0, 0, 0, 0.8); + --role-label-color: var(--shades-black-80); }