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
});
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,

View File

@ -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}
/>
<Toolbar
className="Toolbar"
@ -443,8 +441,6 @@ IDEView.propTypes = {
toast: PropTypes.shape({
isVisible: PropTypes.bool.isRequired
}).isRequired,
showToast: PropTypes.func.isRequired,
setToastText: PropTypes.func.isRequired
};
function mapStateToProps(state) {

View File

@ -12,7 +12,7 @@
.toast__close {
@extend %icon;
& g {
fill: $toast-text-color;
fill: $toast-text-color;
}
margin-left: #{10 / $base-font-size}rem;
}