diff --git a/frontend/src/components/TradeBox/EncryptedChat/ChatBottom/index.tsx b/frontend/src/components/TradeBox/EncryptedChat/ChatBottom/index.tsx index a1de80b2..3d535c34 100644 --- a/frontend/src/components/TradeBox/EncryptedChat/ChatBottom/index.tsx +++ b/frontend/src/components/TradeBox/EncryptedChat/ChatBottom/index.tsx @@ -4,6 +4,7 @@ import { ExportIcon } from '../../../Icons'; import KeyIcon from '@mui/icons-material/Key'; import { useTranslation } from 'react-i18next'; import { saveAsJson } from '../../../../utils'; +import { systemClient } from '../../../../services/System'; interface Props { orderId: number; @@ -16,6 +17,14 @@ const ChatBottom: React.FC = ({ orderId, setAudit, audit, createJsonFile const { t } = useTranslation(); const theme = useTheme(); + const onPGPClick: () => void = () => { + if (window.ReactNativeWebView === undefined) { + saveAsJson('complete_log_chat_' + orderId + '.json', createJsonFile()); + } else { + systemClient.copyToClipboard(JSON.stringify(createJsonFile())); + } + }; + return ( <> @@ -41,12 +50,7 @@ const ChatBottom: React.FC = ({ orderId, setAudit, audit, createJsonFile enterNextDelay={2000} title={t('Save full log as a JSON file (messages and credentials)')} > -