mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
384a53b339
commit
d7f43bfc1a
2 changed files with 7 additions and 11 deletions
|
|
@ -34,17 +34,10 @@
|
|||
<div class=" flex items-center gap-2 mr-3">
|
||||
<div class="self-center flex items-center">
|
||||
<Checkbox
|
||||
state={_filters[filter].is_global
|
||||
? 'checked'
|
||||
: _filters[filter].selected
|
||||
? 'checked'
|
||||
: 'unchecked'}
|
||||
disabled={_filters[filter].is_global}
|
||||
state={_filters[filter].selected ? 'checked' : 'unchecked'}
|
||||
on:change={(e) => {
|
||||
if (!_filters[filter].is_global) {
|
||||
_filters[filter].selected = e.detail === 'checked';
|
||||
selectedFilterIds = Object.keys(_filters).filter((t) => _filters[t].selected);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -753,7 +753,10 @@
|
|||
|
||||
{#if filterIds.length > 0}
|
||||
{@const toggleableFilters = $functions.filter(
|
||||
(func) => func.type === 'filter' && filterIds.includes(func.id) && func?.meta?.toggle
|
||||
(func) =>
|
||||
func.type === 'filter' &&
|
||||
(filterIds.includes(func.id) || func?.is_global) &&
|
||||
func?.meta?.toggle
|
||||
)}
|
||||
|
||||
{#if toggleableFilters.length > 0}
|
||||
|
|
|
|||
Loading…
Reference in a new issue