Welcome to Interviewer!
+Welcome to Interviewer! test
diff --git a/src/utils/exportProcess.js b/src/utils/exportProcess.js index ec68aecb3..96efaf42b 100644 --- a/src/utils/exportProcess.js +++ b/src/utils/exportProcess.js @@ -1,6 +1,6 @@ import React from 'react'; +import { Button, Icon } from '@codaco/ui'; import { batch } from 'react-redux'; -import { Icon } from '@codaco/ui'; import { store } from '../ducks/store'; import { actionCreators as toastActions } from '../ducks/modules/toasts'; import { actionCreators as sessionsActions } from '../ducks/modules/sessions'; @@ -14,6 +14,13 @@ import { getRemoteProtocolID } from './networkFormat'; const { dispatch } = store; const { getState } = store; +function selectAllText() { + const textarea = document.getElementById('debug'); + if (textarea) { + textarea.select(); + } +} + const setInitialExportStatus = () => { dispatch(exportProgressActions.update({ statusText: 'Starting export...', @@ -101,7 +108,7 @@ export const exportToFile = (sessionList, filename) => { errors.push(error); }); - fileExportManager.on('finished', () => { + fileExportManager.on('finished', (logData) => { dispatch(exportProgressActions.reset()); if (succeeded.length > 0) { @@ -142,6 +149,28 @@ export const exportToFile = (sessionList, filename) => { return; } + if (logData && logData.length > 0) { + dispatch(dialogActions.openDialog({ + type: 'Notice', + title: 'Export Log', + message: ( + <> +
+ The export log contains detailed information about the export process. +
+