mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-08 03:08:02 +00:00
refac
This commit is contained in:
parent
aa3d569610
commit
2f97c9fce3
1 changed files with 4 additions and 2 deletions
|
|
@ -37,6 +37,7 @@
|
|||
} from '$lib/apis/terminal';
|
||||
import { isCodeFile } from '$lib/utils/codeHighlight';
|
||||
import { isSavedChatId, isTemporaryChatId } from '$lib/utils/chatId';
|
||||
import { copyToClipboard } from '$lib/utils';
|
||||
import { normalizeDocumentTargetPage } from '$lib/utils/documentPreview';
|
||||
|
||||
import Spinner from '../common/Spinner.svelte';
|
||||
|
|
@ -1625,8 +1626,9 @@
|
|||
<button
|
||||
class="shrink-0 flex h-5 w-5 items-center justify-center rounded transition-colors duration-100 text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300"
|
||||
on:click={async () => {
|
||||
await navigator.clipboard.writeText(fileContent ?? '');
|
||||
toast.success($i18n.t('Copied to clipboard'));
|
||||
if (await copyToClipboard(fileContent ?? '')) {
|
||||
toast.success($i18n.t('Copied to clipboard'));
|
||||
}
|
||||
}}
|
||||
aria-label={$i18n.t('Copy')}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue