From 41e6ce1c780ef373582f5c24a069a8feef137227 Mon Sep 17 00:00:00 2001 From: catarak Date: Wed, 7 Sep 2016 19:12:01 -0400 Subject: [PATCH] add toast to show you that autosave is enabled --- client/modules/IDE/actions/project.js | 6 +++++- client/modules/IDE/pages/IDEView.js | 4 ---- client/styles/components/_toast.scss | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/modules/IDE/actions/project.js b/client/modules/IDE/actions/project.js index 18ad523d..58111f64 100644 --- a/client/modules/IDE/actions/project.js +++ b/client/modules/IDE/actions/project.js @@ -80,7 +80,11 @@ export function saveProject() { files: response.data.files }); dispatch(showToast()); - dispatch(setToastText('Project saved.')); + if (state.preferences.autosave) { + dispatch(setToastText('Autosave enabled.')); + } else { + dispatch(setToastText('Project saved.')); + } }) .catch(response => dispatch({ type: ActionTypes.PROJECT_SAVE_FAIL, diff --git a/client/modules/IDE/pages/IDEView.js b/client/modules/IDE/pages/IDEView.js index 04b36d06..f7bd2599 100644 --- a/client/modules/IDE/pages/IDEView.js +++ b/client/modules/IDE/pages/IDEView.js @@ -127,8 +127,6 @@ class IDEView extends React.Component { logoutUser={this.props.logoutUser} stopSketch={this.props.stopSketch} showShareModal={this.props.showShareModal} - showToast={this.props.showToast} - setToastText={this.props.setToastText} />