diff --git a/src/components/run/RunContent.tsx b/src/components/run/RunContent.tsx index 90937902b..80dd99843 100644 --- a/src/components/run/RunContent.tsx +++ b/src/components/run/RunContent.tsx @@ -29,7 +29,7 @@ import TravelExploreIcon from '@mui/icons-material/TravelExplore'; import SearchIcon from '@mui/icons-material/Search'; import PsychologyIcon from '@mui/icons-material/Psychology'; import StorageIcon from '@mui/icons-material/Storage'; -import { ContentCopy } from "@mui/icons-material"; +import { ContentCopy, Check } from "@mui/icons-material"; import { useEffect, useState } from "react"; import JSZip from "jszip"; import Table from '@mui/material/Table'; @@ -54,6 +54,37 @@ interface RunContentProps { } | null, } +const CopyButton: React.FC<{ content: string; darkMode: boolean }> = ({ content, darkMode }) => { + const [copied, setCopied] = useState(false); + const handleCopy = () => { + navigator.clipboard.writeText(content); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + return ( + + + {copied ? : } + + + ); +}; + export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRef, abortRunHandler, workflowProgress }: RunContentProps) => { const { t } = useTranslation(); const { darkMode } = useThemeMode(); @@ -1266,11 +1297,14 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe - - - {textContent} - - + + + + {textContent} + + + +