mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-11 00:20:54 +00:00
4.14.0
* Added: Profiles can now be toggled on and off, rather than relying on rules to control them. * Added: Right-clicking the FFZ menu button in the top right of the page will open a Profiles dialog, letting you quickly toggle a profile on or off. * Added: Profiles can now be enabled or disabled based upon the time of day. * Added: Polish and Serbian pluralization rules. * Fixed: Ensure tool-tips work on the new dashboard. * Fixed: Ensure the FFZ Control Center works on the new dashboard.
This commit is contained in:
parent
02efd61f00
commit
62bb6440f3
30 changed files with 503 additions and 52 deletions
|
@ -118,8 +118,9 @@ export default class SettingsContext extends EventEmitter {
|
|||
selectProfiles() {
|
||||
const new_profiles = [],
|
||||
order = this.order = [];
|
||||
|
||||
for(const profile of this.manager.__profiles)
|
||||
if ( profile.matches(this.__context) ) {
|
||||
if ( profile.toggled && profile.matches(this.__context) ) {
|
||||
new_profiles.push(profile);
|
||||
order.push(profile.id);
|
||||
}
|
||||
|
@ -389,6 +390,16 @@ export default class SettingsContext extends EventEmitter {
|
|||
}
|
||||
|
||||
|
||||
hasProfile(profile) {
|
||||
if ( typeof profile === 'number' )
|
||||
for(const prof of this.__profiles)
|
||||
if ( prof.id === profile )
|
||||
return true;
|
||||
|
||||
return this.__profiles.includes(profile);
|
||||
}
|
||||
|
||||
|
||||
_getRaw(key, type) {
|
||||
if ( ! type )
|
||||
throw new Error(`non-existent type for ${key}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue