From bd11a6f2aa7b28a806cc91c5c81f2bf165137aad Mon Sep 17 00:00:00 2001 From: SirStendec Date: Thu, 16 May 2019 14:46:26 -0400 Subject: [PATCH] 4.0.0-rc21 * Added: In-Line Chat Actions can now be set to display with specific modifier keys being held. This feature currently requires that Freeze Chat Scrolling is enabled. (Though, why you'd want to use this without that feature is beyond me.) * Fixed: Bug with custom chat width in theater mode. * Fixed: The `Get Bits` button appearing when disabled. * Fixed: Issue with highlighting chat usernames when using Firefox. * Fixed: Misc minor bugs. --- src/i18n.js | 3 + src/main.js | 2 +- src/modules/chat/actions/index.jsx | 34 +++++- src/modules/chat/actions/types.jsx | 2 +- src/modules/chat/index.js | 5 +- src/modules/chat/room.js | 8 +- src/modules/chat/tokenizers.jsx | 2 +- .../main_menu/components/action-editor.vue | 111 +++++++++++++++++- .../main_menu/components/chat-actions.vue | 1 + .../twitch-twilight/modules/bits_button.js | 2 +- .../twitch-twilight/modules/chat/index.js | 21 +++- .../twitch-twilight/modules/chat/line.js | 9 +- .../twitch-twilight/modules/chat/scroller.js | 63 +++++++++- src/sites/twitch-twilight/modules/layout.js | 4 +- src/utilities/dialog.js | 6 +- styles/chat.scss | 49 ++++++++ 16 files changed, 299 insertions(+), 23 deletions(-) diff --git a/src/i18n.js b/src/i18n.js index c71e7a1e..c9681ae4 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -155,6 +155,9 @@ export class TranslationManager extends Module { handleMessage(event) { const msg = event.data; + if ( ! msg ) + return; + if ( msg.type === 'seen' ) this.see(msg.key, true); diff --git a/src/main.js b/src/main.js index 4c4d5574..9c3ec60f 100644 --- a/src/main.js +++ b/src/main.js @@ -149,7 +149,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}` FrankerFaceZ.Logger = Logger; const VER = FrankerFaceZ.version_info = { - major: 4, minor: 0, revision: 0, extra: '-rc20.5', + major: 4, minor: 0, revision: 0, extra: '-rc21', commit: __git_commit__, build: __webpack_hash__, toString: () => diff --git a/src/modules/chat/actions/index.jsx b/src/modules/chat/actions/index.jsx index 72b79c25..e329cf99 100644 --- a/src/modules/chat/actions/index.jsx +++ b/src/modules/chat/actions/index.jsx @@ -77,6 +77,7 @@ export default class Actions extends Module { component: 'chat-actions', context: ['user', 'room', 'message'], inline: true, + modifiers: true, data: () => { const chat = this.resolve('site.chat'); @@ -437,7 +438,10 @@ export default class Actions extends Module { if ( current_level < 3 ) mod_icons = false; - const chat = this.resolve('site.chat'); + const chat = this.resolve('site.chat'), + modified = []; + + let had_action = false; for(const data of this.parent.context.get('chat.actions.inline')) { if ( ! data.action || ! data.appearance ) @@ -445,6 +449,7 @@ export default class Actions extends Module { const ap = data.appearance || {}, disp = data.display || {}, + keys = disp.keys, def = this.renderers[ap.type]; @@ -459,8 +464,14 @@ export default class Actions extends Module { color = has_color && (chat && chat.colors ? chat.colors.process(ap.color) : ap.color), contents = def.render.call(this, ap, createElement, color); - actions.push(