1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 18:06:55 +00:00

Replace simple view settings filters with building tree based on view

This commit is contained in:
Dan Salvato 2024-02-08 14:59:23 -07:00
parent 0997af44c3
commit 5bcd946c70
5 changed files with 2 additions and 52 deletions

View file

@ -61,19 +61,6 @@ export default {
if ( item.no_filter ) if ( item.no_filter )
return true; return true;
if ( this.context.simple_view ) {
// Don't hide any add-on settings in simple view
if ( item.path && item.path.startsWith('Add-Ons') )
return true;
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 || ! item.simple )
return false;
}
if ( ! this.filter ) if ( ! this.filter )
return true; return true;

View file

@ -190,19 +190,6 @@ export default {
if ( item.no_filter ) if ( item.no_filter )
return true; return true;
if ( this.context.simple_view ) {
// Don't hide any add-on settings in simple view
if ( item.path && item.path.startsWith('Add-Ons') )
return true;
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 || ! item.simple )
return false;
}
if ( ! this.filter ) if ( ! this.filter )
return true; return true;

View file

@ -115,19 +115,6 @@ export default {
if ( item.no_filter ) if ( item.no_filter )
return true; return true;
if ( this.context.simple_view ) {
// Don't hide any add-on settings in simple view
if ( item.path && item.path.startsWith('Add-Ons') )
return true;
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 || ! item.simple )
return false;
}
if ( ! this.filter ) if ( ! this.filter )
return true; return true;

View file

@ -625,6 +625,8 @@ export default class MainMenu extends Module {
_addDefinitionToTree(key, def, simple) { _addDefinitionToTree(key, def, simple) {
if ( ! def.ui || ! this._settings_tree ) if ( ! def.ui || ! this._settings_tree )
return; return;
if ( simple && ! def.ui.simple )
return;
if ( simple && def.ui.simple_path ) if ( simple && def.ui.simple_path )
def.ui.path_tokens = parse_path(def.ui.simple_path); def.ui.path_tokens = parse_path(def.ui.simple_path);

View file

@ -213,19 +213,6 @@ export default {
if ( item.no_filter ) if ( item.no_filter )
return true; return true;
if ( this.context.simple_view ) {
// Don't hide any add-on settings in simple view
if ( item.path && item.path.startsWith('Add-Ons') )
return true;
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 || ! item.simple )
return false;
}
if ( ! this.filter ) if ( ! this.filter )
return true; return true;