|
@@ -20,6 +20,7 @@
|
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
|
import Switch from '$lib/components/common/Switch.svelte';
|
|
|
import Spinner from '$lib/components/common/Spinner.svelte';
|
|
|
+ import XMark from '$lib/components/icons/XMark.svelte';
|
|
|
|
|
|
import ModelEditor from '$lib/components/workspace/Models/ModelEditor.svelte';
|
|
|
import { toast } from 'svelte-sonner';
|
|
@@ -271,6 +272,18 @@
|
|
|
bind:value={searchValue}
|
|
|
placeholder={$i18n.t('Search Models')}
|
|
|
/>
|
|
|
+ {#if searchValue}
|
|
|
+ <div class="self-center pl-1.5 translate-y-[0.5px] rounded-l-xl bg-transparent">
|
|
|
+ <button
|
|
|
+ class="p-0.5 rounded-full hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
|
+ on:click={() => {
|
|
|
+ searchValue = '';
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <XMark className="size-3" strokeWidth="2" />
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|