add toast to show you that autosave is enabled

This commit is contained in:
catarak 2016-09-07 19:12:01 -04:00
parent 3352fe9d0d
commit 41e6ce1c78
3 changed files with 6 additions and 6 deletions

View file

@ -80,7 +80,11 @@ export function saveProject() {
files: response.data.files files: response.data.files
}); });
dispatch(showToast()); dispatch(showToast());
dispatch(setToastText('Project saved.')); if (state.preferences.autosave) {
dispatch(setToastText('Autosave enabled.'));
} else {
dispatch(setToastText('Project saved.'));
}
}) })
.catch(response => dispatch({ .catch(response => dispatch({
type: ActionTypes.PROJECT_SAVE_FAIL, type: ActionTypes.PROJECT_SAVE_FAIL,

View file

@ -127,8 +127,6 @@ class IDEView extends React.Component {
logoutUser={this.props.logoutUser} logoutUser={this.props.logoutUser}
stopSketch={this.props.stopSketch} stopSketch={this.props.stopSketch}
showShareModal={this.props.showShareModal} showShareModal={this.props.showShareModal}
showToast={this.props.showToast}
setToastText={this.props.setToastText}
/> />
<Toolbar <Toolbar
className="Toolbar" className="Toolbar"
@ -443,8 +441,6 @@ IDEView.propTypes = {
toast: PropTypes.shape({ toast: PropTypes.shape({
isVisible: PropTypes.bool.isRequired isVisible: PropTypes.bool.isRequired
}).isRequired, }).isRequired,
showToast: PropTypes.func.isRequired,
setToastText: PropTypes.func.isRequired
}; };
function mapStateToProps(state) { function mapStateToProps(state) {