mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-07 06:40:54 +00:00
4.20.11
* Added: Setting to disable Channel Hosting. * Added: Setting to hide streams tagged as Promoted from the directory. * Fixed: Tool-tips not appearing when an element is open in fullscreen. * Fixed: Bug when destroying a tool-tip instance. * Fixed: Directory cards not updating with FFZ features on the front page. * API Added: `Subpump` module for manipulating Twitch PubSub events. * API Changed: Add-Ons can now define custom settings profile filters.
This commit is contained in:
parent
ced61d2bfc
commit
22c60050e0
17 changed files with 356 additions and 96 deletions
|
@ -12,6 +12,8 @@ import SettingsProfile from './profile';
|
|||
import SettingsContext from './context';
|
||||
import MigrationManager from './migration';
|
||||
|
||||
import * as FILTERS from './filters';
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// SettingsManager
|
||||
|
@ -38,12 +40,19 @@ export default class SettingsManager extends Module {
|
|||
this.ui_structures = new Map;
|
||||
this.definitions = new Map;
|
||||
|
||||
// Filters
|
||||
this.filters = {};
|
||||
|
||||
for(const key in FILTERS)
|
||||
if ( has(FILTERS, key) )
|
||||
this.filters[key] = FILTERS[key];
|
||||
|
||||
|
||||
// Create our provider as early as possible.
|
||||
const provider = this.provider = this._createProvider();
|
||||
this.log.info(`Using Provider: ${provider.constructor.name}`);
|
||||
provider.on('changed', this._onProviderChange, this);
|
||||
|
||||
|
||||
this.migrations = new MigrationManager(this);
|
||||
|
||||
// Also create the main context as early as possible.
|
||||
|
@ -63,6 +72,20 @@ export default class SettingsManager extends Module {
|
|||
this.enable();
|
||||
}
|
||||
|
||||
|
||||
addFilter(key, data) {
|
||||
if ( this.filters[key] )
|
||||
return this.log.warn('Tried to add already existing filter', key);
|
||||
|
||||
this.filters[key] = data;
|
||||
this.updateRoutes();
|
||||
}
|
||||
|
||||
getFilterBasicEditor() { // eslint-disable-line class-methods-use-this
|
||||
return () => import(/* webpackChunkName: 'main-menu' */ './components/basic-toggle.vue')
|
||||
}
|
||||
|
||||
|
||||
generateLog() {
|
||||
const out = [];
|
||||
for(const [key, value] of this.main_context.__cache.entries())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue