mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-07 23:00:54 +00:00
4.0.0-rc4.3
* Added: Settings Search * Added: Button to open the FFZ Control Center in a new window. * Added: Button to fade the FFZ Control Center.
This commit is contained in:
parent
a23bc74ae4
commit
0775cd1e77
23 changed files with 214 additions and 53 deletions
|
@ -8,27 +8,45 @@
|
|||
class="tw-pd-b-1"
|
||||
v-html="t(item.desc_i18n_key, item.description, item)"
|
||||
/>
|
||||
<component
|
||||
<div
|
||||
v-for="i in item.contents"
|
||||
:is="i.component"
|
||||
:context="context"
|
||||
:item="i"
|
||||
:key="i.full_key"
|
||||
/>
|
||||
:class="{'ffz-unmatched-item': showing && ! shouldShow(i)}"
|
||||
>
|
||||
<component
|
||||
:is="i.component"
|
||||
:context="context"
|
||||
:item="i"
|
||||
:filter="filter"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['item', 'context'],
|
||||
props: ['item', 'context', 'filter'],
|
||||
|
||||
computed: {
|
||||
showing() {
|
||||
return this.shouldShow(this.item);
|
||||
},
|
||||
|
||||
classes() {
|
||||
return [
|
||||
'ffz--menu-container',
|
||||
this.item.full_box ? 'tw-border' : 'tw-border-t'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
shouldShow(item) {
|
||||
if ( ! this.filter || ! this.filter.length || ! item.search_terms )
|
||||
return true;
|
||||
|
||||
return item.search_terms.includes(this.filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue