Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

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

Gabe Kangas3541adb74388
diff --git a/webroot/js/components/chat/username.js b/webroot/js/components/chat/username.js
index a6cdf6908f..3770025765 100644
--- a/webroot/js/components/chat/username.js
+++ b/webroot/js/components/chat/username.js
@@ -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>