1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-24 15:00:56 +00:00
* Fixed: Reduce the amount of re-rendering that happens when a mass gift sub happens in chat.
* Fixed: Do not display stream latency metadata when watching non-live content.
* Fixed: Add support for user name overrides to clips and video chat.
* Fixed: Badge tooltips on the clips subdomain.
* API Added: `ffz_user_class`, `ffz_user_props`, and `ffz_user_style` on chat messages for customizing the display of usernames on messages in chat.
This commit is contained in:
SirStendec 2021-12-28 13:46:26 -05:00
parent 425276ed08
commit dfb16c8483
7 changed files with 108 additions and 26 deletions

View file

@ -485,18 +485,26 @@ other {# messages were deleted by a moderator.}
const user_block = t.chat.formatUser(user, e);
const override_name = t.overrides.getName(user.id);
const user_props = {
className: `chat-line__username notranslate${override_name ? ' ffz--name-override tw-relative ffz-il-tooltip__container' : ''} ${msg.ffz_user_class ?? ''}`,
role: 'button',
style: { color },
onClick: this.ffz_user_click_handler,
onContextMenu: t.actions.handleUserContext
};
if ( msg.ffz_user_props )
Object.assign(user_props, msg.ffz_user_props);
if ( msg.ffz_user_style )
Object.assign(user_props.style, msg.ffz_user_style);
const user_bits = [
t.actions.renderInline(msg, this.props.showModerationIcons, u, r, e),
e('span', {
className: 'chat-line__message--badges'
}, t.chat.badges.render(msg, e)),
e('span', {
className: `chat-line__username notranslate${override_name ? ' ffz--name-override tw-relative ffz-il-tooltip__container' : ''}`,
role: 'button',
style: { color },
onClick: this.ffz_user_click_handler,
onContextMenu: t.actions.handleUserContext
}, override_name ? [
e('span', user_props, override_name ? [
e('span', {
className: 'chat-author__display-name'
}, override_name),