Only show moderator flag if you are a moderator. Fixes #1536

This commit is contained in:
Gabe Kangas 2021-11-16 17:59:59 -08:00
parent 7b1d24873e
commit d213c4a5b7

View file

@ -92,6 +92,10 @@ export default class UsernameForm extends Component {
},
};
const moderatorFlag = html`
<img src="/img/moderator.svg" class="moderator-flag rounded-lg" />
`;
return html`
<div id="user-info" class="whitespace-nowrap">
<div
@ -105,10 +109,7 @@ export default class UsernameForm extends Component {
id="username-display"
class="text-indigo-600 text-xs font-semibold truncate overflow-hidden whitespace-no-wrap ${isModerator &&
'moderator-flag'}"
><img
src="/img/moderator.svg"
class="moderator-flag rounded-lg"
/>${username}</span
>${isModerator && moderatorFlag}${username}</span
>
</div>