refac
This commit is contained in:
@@ -1760,7 +1760,13 @@
|
|||||||
<Tooltip content={filter?.name} placement="top">
|
<Tooltip content={filter?.name} placement="top">
|
||||||
<button
|
<button
|
||||||
on:click|preventDefault={() => {
|
on:click|preventDefault={() => {
|
||||||
selectedFilterIds = selectedFilterIds.filter((id) => id !== filterId);
|
if (filter?.has_user_valves && ($_user?.role === 'admin' || ($_user?.permissions?.chat?.valves ?? true))) {
|
||||||
|
selectedValvesType = 'function';
|
||||||
|
selectedValvesItemId = filterId;
|
||||||
|
showValvesModal = true;
|
||||||
|
} else {
|
||||||
|
selectedFilterIds = selectedFilterIds.filter((id) => id !== filterId);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
class="group p-[7px] flex gap-1.5 items-center text-sm rounded-full transition-colors duration-300 focus:outline-hidden max-w-full overflow-hidden {selectedFilterIds.includes(
|
class="group p-[7px] flex gap-1.5 items-center text-sm rounded-full transition-colors duration-300 focus:outline-hidden max-w-full overflow-hidden {selectedFilterIds.includes(
|
||||||
@@ -1783,7 +1789,16 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<Sparkles className="size-4" strokeWidth="1.75" />
|
<Sparkles className="size-4" strokeWidth="1.75" />
|
||||||
{/if}
|
{/if}
|
||||||
<div class="hidden group-hover:block">
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
|
<div
|
||||||
|
class="hidden group-hover:block"
|
||||||
|
on:click={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
selectedFilterIds = selectedFilterIds.filter((id) => id !== filterId);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<XMark className="size-4" strokeWidth="1.75" />
|
<XMark className="size-4" strokeWidth="1.75" />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user