From 8fb51dc06bf718939897ed124a5ecb5a385e5947 Mon Sep 17 00:00:00 2001 From: SirStendec Date: Thu, 13 Aug 2020 14:00:47 -0400 Subject: [PATCH] 4.20.30 * Added: Support for Twitch's native chat replies style. * Added: Option to display in-line actions on hover. * Added: Option for changing the current replies style, including a choice to disable replies. * Fixed: Hover styling for elements including rich chat embeds due to a removed CSS class. --- package.json | 2 +- src/modules/chat/actions/index.jsx | 10 +- src/modules/chat/actions/types.jsx | 2 +- src/modules/chat/components/chat-rich.vue | 2 +- src/modules/chat/index.js | 2 - src/modules/chat/tokenizers.jsx | 14 +-- .../main_menu/components/action-editor.vue | 20 ++++ src/settings/context.js | 2 +- .../twitch-twilight/modules/chat/index.js | 16 ++++ .../twitch-twilight/modules/chat/line.js | 95 ++++++++++++++----- .../modules/chat/rich_content.jsx | 2 +- .../modules/chat/settings_menu.jsx | 6 +- .../css_tweaks/styles/chat-padding.scss | 2 +- .../modules/directory/following.jsx | 4 +- src/sites/twitch-twilight/styles/chat.scss | 22 +++++ src/utilities/rich_tokens.js | 2 +- styles/chat.scss | 5 + 17 files changed, 160 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index ef2699c0..beb9e479 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.20.29", + "version": "4.20.30", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { diff --git a/src/modules/chat/actions/index.jsx b/src/modules/chat/actions/index.jsx index 42affe17..7fa7cec7 100644 --- a/src/modules/chat/actions/index.jsx +++ b/src/modules/chat/actions/index.jsx @@ -484,11 +484,16 @@ export default class Actions extends Module { const u = site.getUser(), r = {id: line.props.channelID, login: room}; + const has_replies = line.chatRepliesTreatment ? line.chatRepliesTreatment !== 'control' : false, + can_replies = has_replies && ! msg.deleted && ! line.props.disableReplyClick, + can_reply = can_replies && u.login !== msg.user?.login && ! msg.reply; + msg.roomId = r.id; if ( u ) { u.moderator = line.props.isCurrentUserModerator; u.staff = line.props.isCurrentUserStaff; + u.can_reply = this.parent.context.get('chat.replies.style') === 2 && can_reply; } const current_level = this.getUserLevel(r, u), @@ -629,6 +634,7 @@ export default class Actions extends Module { let ap = data.appearance || {}; const disp = data.display || {}, keys = disp.keys, + hover = disp.hover, act = this.actions[data.action]; if ( ! act || disp.disabled || @@ -661,12 +667,12 @@ export default class Actions extends Module { let list = actions; - if ( keys ) + if ( keys || hover ) list = modified; had_action = true; list.push(