"test/ut/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "8b2eb425274cdb4537fbce4a315aec12a378d6db"
Commit db3b0757 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: input menu tools

parent 0bb26ae5
...@@ -46,28 +46,31 @@ ...@@ -46,28 +46,31 @@
transition={flyAndScale} transition={flyAndScale}
> >
{#if Object.keys(tools).length > 0} {#if Object.keys(tools).length > 0}
{#each Object.keys(tools) as toolId} <div class=" max-h-28 overflow-y-auto scrollbar-hidden">
<div {#each Object.keys(tools) as toolId}
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer rounded-xl" <div
> class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer rounded-xl"
<div class="flex-1 flex items-center gap-2"> >
<WrenchSolid /> <div class="flex-1 flex items-center gap-2">
<WrenchSolid />
<Tooltip content={tools[toolId]?.description ?? ''}> <Tooltip content={tools[toolId]?.description ?? ''}>
<div class="flex items-center line-clamp-1">{tools[toolId].name}</div> <div class="flex items-center line-clamp-1">{tools[toolId].name}</div>
</Tooltip> </Tooltip>
</div>
<Switch
bind:state={tools[toolId].enabled}
on:change={(e) => {
selectedToolIds = e.detail
? [...selectedToolIds, toolId]
: selectedToolIds.filter((id) => id !== toolId);
}}
/>
</div> </div>
{/each}
</div>
<Switch
bind:state={tools[toolId].enabled}
on:change={(e) => {
selectedToolIds = e.detail
? [...selectedToolIds, toolId]
: selectedToolIds.filter((id) => id !== toolId);
}}
/>
</div>
{/each}
<hr class="border-gray-100 dark:border-gray-800 my-1" /> <hr class="border-gray-100 dark:border-gray-800 my-1" />
{/if} {/if}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment