mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-07 23:00:54 +00:00
Add "simple view" context, setting, and Vue component filters
This commit is contained in:
parent
3ca8f2f6f3
commit
8d2e58500d
6 changed files with 68 additions and 4 deletions
|
@ -62,6 +62,16 @@ export default {
|
|||
return true;
|
||||
|
||||
if ( this.filter.flags ) {
|
||||
if ( this.filter.flags.has('simple_view') ) {
|
||||
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.flags.has('modified') ) {
|
||||
// We need to tree walk for this one.
|
||||
if ( ! is_walking ) {
|
||||
|
@ -72,6 +82,9 @@ export default {
|
|||
return true;
|
||||
}
|
||||
|
||||
if ( this.context.simple_view && ! item.simple )
|
||||
return false;
|
||||
|
||||
if ( ! item.setting || ! this.context.currentProfile.has(item.setting) )
|
||||
return false;
|
||||
}
|
||||
|
@ -86,4 +99,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue