mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-28 21:48:31 +00:00
4.2.0
This is a fairly hefty update, behind the scenes. We've rewritten all code that deals with chat scrolling in order to integrate with Twitch's last batch of changes that made chat pausing accessible for moderators. This update also enables the Add-Ons System for all users. * Added: Setting to allow you to pause chat with a hot key, even when the mouse isn't hovering over chat. * Added: Setting to control how long chat remains paused due to move movement. * Fixed: Chat row backgrounds changing when messages are removed from chat. * Changed: Integrate with Twitch's own chat pausing code, where it makes sense. * Changed: Remove the experiment locking down access to the Add-Ons Loader. * Changed: When using the current time as a cache buster, truncate it to the nearest 5 second interval.
This commit is contained in:
parent
535192d931
commit
cebb1c0140
11 changed files with 699 additions and 432 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import Module from 'utilities/module';
|
||||
import {createElement} from 'utilities/dom';
|
||||
import {has, deep_copy} from 'utilities/object';
|
||||
import {get, has, deep_copy} from 'utilities/object';
|
||||
|
||||
import Dialog from 'utilities/dialog';
|
||||
|
||||
|
@ -44,6 +44,7 @@ export default class MainMenu extends Module {
|
|||
this.dialog = new Dialog(() => this.buildDialog());
|
||||
this.has_update = false;
|
||||
this.opened = false;
|
||||
this.showing = false;
|
||||
|
||||
this.settings.addUI('profiles', {
|
||||
path: 'Data Management @{"sort": 1000, "profile_warning": false} > Profiles @{"profile_warning": false}',
|
||||
|
@ -139,11 +140,13 @@ export default class MainMenu extends Module {
|
|||
this.on('i18n:update', this.scheduleUpdate, this);
|
||||
|
||||
this.dialog.on('show', () => {
|
||||
this.showing = true;
|
||||
this.opened = true;
|
||||
this.updateButtonUnseen();
|
||||
this.emit('show')
|
||||
});
|
||||
this.dialog.on('hide', () => {
|
||||
this.showing = false;
|
||||
this.emit('hide');
|
||||
this.destroyDialog();
|
||||
});
|
||||
|
@ -163,6 +166,15 @@ export default class MainMenu extends Module {
|
|||
}
|
||||
|
||||
|
||||
requestPage(page) {
|
||||
const vue = get('_vue.$children.0', this);
|
||||
if ( vue && vue.navigate )
|
||||
vue.navigate(page);
|
||||
else
|
||||
this._wanted_page = page;
|
||||
}
|
||||
|
||||
|
||||
getUnseen() {
|
||||
const pages = this.getSettingsTree();
|
||||
if ( ! Array.isArray(pages) )
|
||||
|
@ -229,9 +241,11 @@ export default class MainMenu extends Module {
|
|||
|
||||
root.nav = tree;
|
||||
root.nav_keys = tree.keys;
|
||||
root.currentItem = tree.keys[key] || (this.has_update ?
|
||||
root.currentItem = tree.keys[key] || (this._wanted_page && tree.keys[this._wanted_page]) || (this.has_update ?
|
||||
tree.keys['home.changelog'] :
|
||||
tree.keys['home']);
|
||||
|
||||
this._wanted_page = null;
|
||||
}
|
||||
|
||||
|
||||
|
@ -706,8 +720,9 @@ export default class MainMenu extends Module {
|
|||
getData() {
|
||||
const settings = this.getSettingsTree(),
|
||||
context = this.getContext(),
|
||||
current = this.has_update ? settings.keys['home.changelog'] : settings.keys['home'];
|
||||
current = (this._wanted_page && settings.keys[this._wanted_page]) || (this.has_update ? settings.keys['home.changelog'] : settings.keys['home']);
|
||||
|
||||
this._wanted_page = null;
|
||||
this.markSeen(current);
|
||||
|
||||
let has_unseen = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue