Merge pull request #9696 from MiroslavDionisiev/UEPR-44

feat: [UEPR-44] exported redux action and added additional class to tutorials button
This commit is contained in:
Miroslav Dionisiev 2024-10-18 14:38:56 +03:00 committed by GitHub
commit 2d13a9d433
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -690,7 +690,7 @@ class MenuBar extends React.Component {
<div className={styles.fileGroup}>
<div
aria-label={this.props.intl.formatMessage(ariaMessages.tutorials)}
className={classNames(styles.menuBarItem, styles.hoverable)}
className={classNames(styles.menuBarItem, styles.hoverable, 'tutorials-button')}
onClick={this.props.onOpenTipLibrary}
>
<img

View File

@ -72,6 +72,9 @@ class GUI extends React.Component {
// At this time the project view in www doesn't need to know when a project is unloaded
this.props.onProjectLoaded();
}
if (this.props.shouldStopProject && !prevProps.shouldStopProject) {
this.props.vm.stopAll();
}
}
render () {
if (this.props.isError) {
@ -130,6 +133,7 @@ GUI.propTypes = {
onVmInit: PropTypes.func,
projectHost: PropTypes.string,
projectId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
shouldStopProject: PropTypes.bool,
telemetryModalVisible: PropTypes.bool,
vm: PropTypes.instanceOf(VM).isRequired
};

View File

@ -6,6 +6,7 @@ import {ScratchPaintReducer} from 'scratch-paint';
import {setFullScreen, setPlayer} from './reducers/mode';
import {remixProject} from './reducers/project-state';
import {setAppElement} from 'react-modal';
import {activateDeck} from './reducers/cards.js';
const guiReducers = {
locales: LocalesReducer,
@ -27,5 +28,6 @@ export {
localesInitialState,
remixProject,
setFullScreen,
setPlayer
setPlayer,
activateDeck
};