Spaces:
Runtime error
Runtime error
Update src/components/menu-bar/menu-bar.jsx
Browse files
src/components/menu-bar/menu-bar.jsx
CHANGED
@@ -84,6 +84,7 @@ import s4sicon from './Glow-4.svg'
|
|
84 |
import scratchLogo from './scratch-logo.svg';
|
85 |
|
86 |
import sharedMessages from '../../lib/shared-messages';
|
|
|
87 |
|
88 |
import SeeInsideButton from './tw-see-inside.jsx';
|
89 |
import { notScratchDesktop } from '../../lib/isScratchDesktop.js';
|
@@ -423,6 +424,18 @@ class MenuBar extends React.Component {
|
|
423 |
this.props.onRequestCloseAbout();
|
424 |
};
|
425 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
render() {
|
427 |
const saveNowMessage = (
|
428 |
<FormattedMessage
|
|
|
84 |
import scratchLogo from './scratch-logo.svg';
|
85 |
|
86 |
import sharedMessages from '../../lib/shared-messages';
|
87 |
+
import { consoleLogs } from '../../lib/pm-log-capture.js';
|
88 |
|
89 |
import SeeInsideButton from './tw-see-inside.jsx';
|
90 |
import { notScratchDesktop } from '../../lib/isScratchDesktop.js';
|
|
|
424 |
this.props.onRequestCloseAbout();
|
425 |
};
|
426 |
}
|
427 |
+
handleClickDownloadLogs() {
|
428 |
+
const str = JSON.stringify(consoleLogs);
|
429 |
+
const a = document.createElement('a');
|
430 |
+
a.style.display = 'none';
|
431 |
+
document.body.append(a);
|
432 |
+
const url = window.URL.createObjectURL(new Blob([str]));
|
433 |
+
a.href = url;
|
434 |
+
a.download = 'pm-log-trace.json';
|
435 |
+
a.click();
|
436 |
+
window.URL.revokeObjectURL(url);
|
437 |
+
a.remove();
|
438 |
+
}
|
439 |
render() {
|
440 |
const saveNowMessage = (
|
441 |
<FormattedMessage
|