diff --git a/fontello.config.json b/fontello.config.json index b620a39c..6341b8a3 100644 --- a/fontello.config.json +++ b/fontello.config.json @@ -567,6 +567,12 @@ "css": "minus", "code": 59445, "src": "fontawesome" + }, + { + "uid": "d870630ff8f81e6de3958ecaeac532f2", + "css": "left-open", + "code": 59446, + "src": "fontawesome" } ] } \ No newline at end of file diff --git a/package.json b/package.json index a029da87..b6df1dc7 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.14.3", + "version": "4.14.4", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { diff --git a/res/font/ffz-fontello.eot b/res/font/ffz-fontello.eot index 11f452d5..6701eb45 100644 Binary files a/res/font/ffz-fontello.eot and b/res/font/ffz-fontello.eot differ diff --git a/res/font/ffz-fontello.svg b/res/font/ffz-fontello.svg index c456ba46..8452e46e 100644 --- a/res/font/ffz-fontello.svg +++ b/res/font/ffz-fontello.svg @@ -114,6 +114,8 @@ + + diff --git a/res/font/ffz-fontello.ttf b/res/font/ffz-fontello.ttf index c302d558..29f79c4a 100644 Binary files a/res/font/ffz-fontello.ttf and b/res/font/ffz-fontello.ttf differ diff --git a/res/font/ffz-fontello.woff b/res/font/ffz-fontello.woff index a70c0c1f..be309ffd 100644 Binary files a/res/font/ffz-fontello.woff and b/res/font/ffz-fontello.woff differ diff --git a/res/font/ffz-fontello.woff2 b/res/font/ffz-fontello.woff2 index 2a63516b..398054b0 100644 Binary files a/res/font/ffz-fontello.woff2 and b/res/font/ffz-fontello.woff2 differ diff --git a/src/modules/main_menu/components/profile-selector.vue b/src/modules/main_menu/components/profile-selector.vue index 62b30721..dfdfd2bd 100644 --- a/src/modules/main_menu/components/profile-selector.vue +++ b/src/modules/main_menu/components/profile-selector.vue @@ -64,7 +64,7 @@ class="tw-tooltip-wrapper ffz--profile-row__icon ffz-i-ok tw-absolute" >
- {{ t('setting.profiles.active', 'This profile is active.') }} + {{ t('setting.profiles.active', 'This profile is enabled and active.') }}
diff --git a/src/sites/twitch-twilight/modules/bttv_compat.js b/src/sites/twitch-twilight/modules/bttv_compat.js new file mode 100644 index 00000000..6dc3599d --- /dev/null +++ b/src/sites/twitch-twilight/modules/bttv_compat.js @@ -0,0 +1,38 @@ +'use strict'; + +// ============================================================================ +// BetterTTV Compatibility +// ============================================================================ + +import Module from 'utilities/module'; + +const CHAT_EVENTS = [ + 'chat-input' +]; + +export default class BTTVCompat extends Module { + constructor(...args) { + super(...args); + + this.should_enable = true; + } + + onEnable() { + this.on('core:dom-update', this.handleDomUpdate, this); + } + + handleDomUpdate(key) { + if ( ! window.BetterTTV?.watcher?.emitLoad ) + return; + + if ( ! CHAT_EVENTS.includes(key) ) + return; + + this.log.info('Sending chat reload event to BetterTTV.'); + try { + window.BetterTTV.watcher.emitLoad('chat'); + } catch(err) { + this.log.error('An error occurred with BetterTTV:', err); + } + } +} \ No newline at end of file diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js index f1710aed..21df5e46 100644 --- a/src/sites/twitch-twilight/modules/chat/index.js +++ b/src/sites/twitch-twilight/modules/chat/index.js @@ -671,11 +671,16 @@ export default class ChatHook extends Module { const old_render = cls.prototype.render; cls.prototype.render = function() { try { - const callout = this.props?.event?.callout; - if ( callout?.trackingType === 'community_points_reward' && ! t.chat.context.get('chat.points.show-callouts') ) + const callout = this.props?.event?.callout, + ctype = callout?.trackingType; + + if ( ctype === 'community_points_reward' && ! t.chat.context.get('chat.points.show-callouts') ) return null; - if ( callout?.trackingType === 'prime_gift_bomb' && ! t.chat.context.get('chat.community-chest.show') ) + if ( ctype === 'prime_gift_bomb' && ! t.chat.context.get('chat.community-chest.show') ) + return null; + + if ( ctype === 'megacheer_emote_recipient' && ! t.chat.context.get('chat.bits.show-rewards') ) return null; } catch(err) { @@ -702,6 +707,9 @@ export default class ChatHook extends Module { if ( ctype === 'community-points-rewards' && ! t.chat.context.get('chat.points.show-callouts') ) return null; + if ( (ctype === 'mega-recipient-rewards' || ctype === 'mega-benefactor-rewards') && ! t.chat.context.get('chat.bits.show-rewards') ) + return null; + } catch(err) { t.log.capture(err); t.log.error(err); diff --git a/src/sites/twitch-twilight/modules/chat/settings_menu.jsx b/src/sites/twitch-twilight/modules/chat/settings_menu.jsx index 712b4ee8..2e0d17f4 100644 --- a/src/sites/twitch-twilight/modules/chat/settings_menu.jsx +++ b/src/sites/twitch-twilight/modules/chat/settings_menu.jsx @@ -57,7 +57,7 @@ export default class SettingsMenu extends Module { this.ffzPauseClick = () => this.setState({ffzPauseMenu: ! this.state.ffzPauseMenu}); val.props.children.push(
- -
-

- {t.i18n.t('chat.settings.pause', 'Pause Chat')} + return (

+
+
+
+
+ +
+
+

+ { t.i18n.t('chat.settings.pause', 'Pause Chat') }

-

- {t.i18n.t('chat.settings.pause-explain', 'FrankerFaceZ overrides the behavior of Pause Chat entirely. Please use FFZ\'s Scrolling settings within the FFZ Control Center under Chat > Behavior.')} -

-
- - {t.cant_window &&
- - {t.i18n.t('popup.error', 'We tried opening a pop-up window and could not. Make sure to allow pop-ups from Twitch.')} - -
} +
+
+
+
+
+

+ { t.i18n.t('chat.settings.pause-explain', 'FrankerFaceZ overrides the behavior of Pause Chat entirely. Please use FFZ\'s Scrolling settings within the FFZ Control Center under Chat > Behavior.') } +

+
+ +
@@ -166,14 +175,15 @@ export default class SettingsMenu extends Module { const old_render = cls.prototype.render; cls.prototype.render = function() { - const out = old_render.call(this); + const out = old_render.call(this), + children = out?.props?.children?.[0]?.props?.children; - if ( out.props && Array.isArray(out.props.children) ) { - let i = out.props.children.length; + if ( Array.isArray(children) ) { + let i = children.length; while(i--) { - const thing = out.props.children[i]; + const thing = children[i]; if ( thing && thing.props && has(thing.props, 'chatPauseSetting') ) { - out.props.children.splice(i, 1); + children.splice(i, 1); break; } } diff --git a/src/sites/twitch-twilight/modules/menu_button.jsx b/src/sites/twitch-twilight/modules/menu_button.jsx index ae060a40..8acb3ca5 100644 --- a/src/sites/twitch-twilight/modules/menu_button.jsx +++ b/src/sites/twitch-twilight/modules/menu_button.jsx @@ -7,6 +7,7 @@ import {DEBUG} from 'utilities/constants'; import {SiteModule} from 'utilities/module'; import {createElement, ClickOutside, setChildren} from 'utilities/dom'; +import { timeout, sleep } from 'src/utilities/object'; export default class MenuButton extends SiteModule { constructor(...args) { @@ -23,6 +24,7 @@ export default class MenuButton extends SiteModule { this._important_update = false; this._new_settings = 0; this._error = null; + this._loading = false; this.settings.add('ffz.show-new-settings', { default: true, @@ -40,6 +42,18 @@ export default class MenuButton extends SiteModule { ); } + get loading() { + return this._loading; + } + + set loading(val) { + if ( val === this._loading ) + return; + + this._loading = val; + this.update(); + } + get has_error() { return this._error != null; } @@ -183,14 +197,12 @@ export default class MenuButton extends SiteModule { const pill = this.formatPill(), extra_pill = this.formatExtraPill(); - // TODO: Pill. - el = (
{btn = (