mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-30 14:38:31 +00:00
4.4.1
* Added: `Current Channel` rule for profiles, to match all pages associated with a certain channel without needing many page rules. * Fixed: Unreadable text in light theme when importing a profile. * Changed: Display a matching page URL in the `Current Page` rule for profiles. * Changed: Do not display an inactive profile warning on the Add-Ons settings page, since those are not affected by profiles. * Changed: Update Vue to a more recent version. * Maintenance: Update the chat types enum based on the latest version of Twitch. * API Added: `TwitchData` module (`site.twitch_data`) for querying Twitch's API for data.
This commit is contained in:
parent
c34b7e30e2
commit
275248ca36
24 changed files with 819 additions and 88 deletions
50
src/sites/twitch-twilight/modules/dashboard.js
Normal file
50
src/sites/twitch-twilight/modules/dashboard.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
'use strict';
|
||||
|
||||
// ============================================================================
|
||||
// Dashboard
|
||||
// ============================================================================
|
||||
|
||||
import Module from 'utilities/module';
|
||||
import { get } from 'utilities/object';
|
||||
|
||||
export default class Dashboard extends Module {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.should_enable = true;
|
||||
|
||||
this.inject('settings');
|
||||
this.inject('site.fine');
|
||||
|
||||
this.Dashboard = this.fine.define(
|
||||
'dashboard',
|
||||
n => n.cards && n.defaultCards && n.saveCardsConfig,
|
||||
['dash']
|
||||
);
|
||||
}
|
||||
|
||||
onEnable() {
|
||||
this.Dashboard.on('mount', this.onUpdate, this);
|
||||
this.Dashboard.on('update', this.onUpdate, this);
|
||||
this.Dashboard.on('unmount', this.onUnmount, this);
|
||||
|
||||
this.Dashboard.ready((cls, instances) => {
|
||||
for(const inst of instances)
|
||||
this.onUpdate(inst);
|
||||
});
|
||||
}
|
||||
|
||||
onUpdate(inst) {
|
||||
this.settings.updateContext({
|
||||
channel: get('props.channelLogin', inst),
|
||||
channelID: get('props.channelID', inst)
|
||||
});
|
||||
}
|
||||
|
||||
onUnmount() {
|
||||
this.settings.updateContext({
|
||||
channel: null,
|
||||
channelID: null
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue