mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 15:27:43 +00:00
4.60.0
* Added: When searching in the FFZ Control Center, you can now use the tag `@modified` to filter by settings that have been changed in the current profile. * Added: Add-ons now have Changelog buttons that navigate to a changelog showing only entries for that add-on. * Changed: The Changelog pages now has nicer formatting for each commit, including add-on icons and clickable links to add-on sub-pages when viewing the Add-on Changelog. * API Added: To prevent FrankerFaceZ from loading into a page, include `disable_frankerfacez` in the URL query parameters. * Experiment Changed: Fix incorrect roll-out percentage for API-Based Link Lookups. This should be fully enabled. * Experiment Changed: Lower the percentage of users in the MQTT-Based PubSub experiment.
This commit is contained in:
parent
5046088bf7
commit
ba72969c51
17 changed files with 416 additions and 72 deletions
|
@ -119,7 +119,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
countMatches(item, seen) {
|
||||
if ( ! this.filter || ! this.filter.length || ! item )
|
||||
if ( ! this.filter || ! item )
|
||||
return 0;
|
||||
|
||||
if ( seen && seen.has(item) )
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
for(const thing of item[key])
|
||||
count += this.countMatches(thing, seen);
|
||||
|
||||
if ( item.setting && item.search_terms && item.search_terms.includes(this.filter) )
|
||||
if ( item.setting && this.shouldShow(item, true) )
|
||||
count++;
|
||||
|
||||
return count;
|
||||
|
@ -209,11 +209,32 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
shouldShow(item) {
|
||||
if ( ! this.filter || ! this.filter.length || ! item.search_terms )
|
||||
shouldShow(item, is_walking = false) {
|
||||
if ( ! this.filter || item.no_filter )
|
||||
return true;
|
||||
|
||||
return item.search_terms.includes(this.filter);
|
||||
if ( this.filter.flags ) {
|
||||
if ( this.filter.flags.has('modified') ) {
|
||||
// We need to tree walk for this one.
|
||||
if ( ! is_walking ) {
|
||||
for(const key of ['tabs', 'contents', 'items'])
|
||||
if ( item[key] )
|
||||
for(const thing of item[key])
|
||||
if ( this.shouldShow(thing) )
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ! item.setting || ! this.context.currentProfile.has(item.setting) )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( this.filter.query ) {
|
||||
if ( ! item.search_terms || ! item.search_terms.includes(this.filter.query) )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue