1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-07 14:50:56 +00:00
* Added: Backup and Restore now supports backing up any binary data stored in FFZ settings, creating a `zip` file rather than a `json` file.
* Fixed: Remove dead code from the `clear-settings` menu component.
* Changed: Update the theme mapping to include missing elements.
* Changed: Data Management > Storage >> Provider now indicates if a provider supports storing binary data.
* Changed: Update the link-parsing regex to match Twitch. Currently under limited roll-out while ensuring the implementation is bug-free.
* API Added: `setting-hotkey` now functions as would be expected and can be used.
* API Changed: A setting's `onUIChange` method now has the Vue component as its second argument, for getting any necessary state from the settings UI.
* API Changed: Providers now sanity check the format of Blobs before storing them.
This commit is contained in:
SirStendec 2021-02-10 16:53:10 -05:00
parent 5412a928a1
commit 2c5937c8af
20 changed files with 574 additions and 138 deletions

View file

@ -238,6 +238,7 @@ export default class Scroller extends Module {
inst.ffz_oldScrollEvent = inst.handleScrollEvent;
inst.ffz_oldScroll = inst.scrollToBottom;
inst.ffz_acting = false;
inst.ffz_outside = true;
inst._ffz_accessor = `_ffz_contains_${last_id++}`;
@ -441,6 +442,20 @@ export default class Scroller extends Module {
// Keyboard Stuff
cls.prototype.ffzUpdateActing = function() {
if ( ! this._ffz_key_frame_acting )
this._ffz_key_frame_acting = requestAnimationFrame(() => this.ffz_updateActing());
}
cls.prototype.ffz_updateActing = function() {
this._ffz_key_frame_acting = null;
if ( ! this.scrollRef?.root )
return;
this.scrollRef.root.dataset.acting = this.ffz_acting;
}
cls.prototype.ffzUpdateKeyTags = function() {
if ( ! this._ffz_key_frame )
this._ffz_key_frame = requestAnimationFrame(() => this.ffz_updateKeyTags());
@ -488,6 +503,7 @@ export default class Scroller extends Module {
require_hover = t.pause_hover;
return (! require_hover || ! this.ffz_outside) && (
(this.ffz_acting) ||
(this.ffz_ctrl && (mode === 2 || mode === 6)) ||
(this.ffz_meta && (mode === 3 || mode === 7)) ||
(this.ffz_alt && (mode === 4 || mode === 8)) ||
@ -526,15 +542,16 @@ export default class Scroller extends Module {
msg = t.i18n.t('chat.messages-below', 'Chat Paused Due to Scroll');
else if ( this.state.isPaused ) {
const f = this.ffzGetMode(),
reason = f === 2 ? t.i18n.t('key.ctrl', 'Ctrl Key') :
f === 3 ? t.i18n.t('key.meta', 'Meta Key') :
f === 4 ? t.i18n.t('key.alt', 'Alt Key') :
f === 5 ? t.i18n.t('key.shift', 'Shift Key') :
f === 6 ? t.i18n.t('key.ctrl_mouse', 'Ctrl or Mouse') :
f === 7 ? t.i18n.t('key.meta_mouse', 'Meta or Mouse') :
f === 8 ? t.i18n.t('key.alt_mouse', 'Alt or Mouse') :
f === 9 ? t.i18n.t('key.shift_mouse', 'Shift or Mouse') :
t.i18n.t('key.mouse', 'Mouse Movement');
reason = this.ffz_acting ? t.i18n.t('chat.acting', 'Taking Action') :
f === 2 ? t.i18n.t('key.ctrl', 'Ctrl Key') :
f === 3 ? t.i18n.t('key.meta', 'Meta Key') :
f === 4 ? t.i18n.t('key.alt', 'Alt Key') :
f === 5 ? t.i18n.t('key.shift', 'Shift Key') :
f === 6 ? t.i18n.t('key.ctrl_mouse', 'Ctrl or Mouse') :
f === 7 ? t.i18n.t('key.meta_mouse', 'Meta or Mouse') :
f === 8 ? t.i18n.t('key.alt_mouse', 'Alt or Mouse') :
f === 9 ? t.i18n.t('key.shift_mouse', 'Shift or Mouse') :
t.i18n.t('key.mouse', 'Mouse Movement');
msg = t.i18n.t('chat.paused', 'Chat Paused Due to {reason}', {reason});
cls = 'ffz--freeze-indicator';