Skip to content

Commit 2876634

Browse files
shinytang6catarak
authored andcommitted
Make saving more user-friendly (#561)
* enhance saving * remove console * rename * duplicate when saving others' projects * fix a bug
1 parent 61560b8 commit 2876634

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/modules/IDE/pages/IDEView.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ class IDEView extends React.Component {
157157
e.stopPropagation();
158158
if (this.isUserOwner() || (this.props.user.authenticated && !this.props.project.owner)) {
159159
this.props.saveProject();
160+
} else if (this.props.user.authenticated) {
161+
this.props.cloneProject();
162+
} else {
163+
this.props.showErrorModal('forceAuthentication');
160164
}
161165
// 13 === enter
162166
} else if (e.keyCode === 13 && e.shiftKey && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
@@ -486,10 +490,10 @@ class IDEView extends React.Component {
486490
<Overlay
487491
title="Error"
488492
ariaLabel="error"
489-
closeOverlay={this.props.hideErrorModal}
490493
>
491494
<ErrorModal
492495
type={this.props.ide.errorType}
496+
closeModal={this.props.hideErrorModal}
493497
/>
494498
</Overlay>
495499
}

0 commit comments

Comments
 (0)