refac
This commit is contained in:
1 parent
668bd44485
commit
43c30428a6
2 files changed
+19
-8
No files matched your search
@@ -1014,7 +1014,7 @@
|
||||
}
|
||||
|
||||
tools.set(await getTools(localStorage.token));
|
||||
}
|
||||
};
|
||||
initialize();
|
||||
|
||||
return () => {
|
||||
@@ -1031,7 +1031,7 @@
|
||||
dropzoneElement.removeEventListener('drop', onDrop);
|
||||
dropzoneElement.removeEventListener('dragleave', onDragLeave);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1809,7 +1809,9 @@
|
||||
|
||||
{#if (!history?.currentId || history.messages[history.currentId]?.done == true) && ($_user?.role === 'admin' || ($_user?.permissions?.chat?.stt ?? true))}
|
||||
<!-- Terminal Server Selector -->
|
||||
{#if ($terminalServers ?? []).length > 0 || ($settings?.terminalServers ?? []).some((s) => s.url)}
|
||||
<TerminalMenu bind:show={showTerminalMenu} />
|
||||
{/if}
|
||||
|
||||
<!-- {$i18n.t('Record voice')} -->
|
||||
<Tooltip content={$i18n.t('Dictate')}>
|
||||
|
||||
@@ -84,21 +84,29 @@
|
||||
$: selectedDirectTerminal = directTerminals.find((t) => t.url === $selectedTerminalId);
|
||||
|
||||
$: selectedLabel =
|
||||
selectedSystemTerminal?.name ??
|
||||
selectedDirectTerminal?.name ??
|
||||
selectedDirectTerminal?.url?.replace(/^https?:\/\//, '') ??
|
||||
null;
|
||||
selectedSystemTerminal?.name ||
|
||||
selectedSystemTerminal?.id ||
|
||||
selectedDirectTerminal?.name ||
|
||||
selectedDirectTerminal?.url?.replace(/^https?:\/\//, '') ||
|
||||
$i18n.t('Terminal');
|
||||
</script>
|
||||
|
||||
<div class="flex items-center translate-x-0.5">
|
||||
<Dropdown bind:show>
|
||||
<Tooltip content={$i18n.t('Terminal')} placement="top">
|
||||
<button
|
||||
type="button"
|
||||
class="flex items-center gap-1.5 px-2 py-1.5 text-sm transition rounded-lg cursor-pointer"
|
||||
class="flex items-center gap-1.5 translate-y-[1px] hover:bg-gray-50 dark:hover:bg-gray-850 text-sm transition rounded-lg cursor-pointer {$selectedTerminalId &&
|
||||
selectedLabel
|
||||
? ' px-2.5 py-1 '
|
||||
: ' p-2 opacity-50'}"
|
||||
>
|
||||
<Cloud className="size-3.5" strokeWidth="2" />
|
||||
|
||||
{#if $selectedTerminalId && selectedLabel}
|
||||
<span class="truncate text-xs max-w-[100px] sm:max-w-[150px]">{selectedLabel}</span>
|
||||
<span class="truncate text-[13px] max-w-[100px] sm:max-w-[150px] capitalize"
|
||||
>{selectedLabel}</span
|
||||
>
|
||||
{/if}
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -249,3 +257,4 @@
|
||||
</DropdownMenu.Content>
|
||||
</div>
|
||||
</Dropdown>
|
||||
</div>
|
||||
Reference in new issue
Block a user