mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 08:25:01 -06:00
refac
This commit is contained in:
@@ -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')}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user