Make saving more user-friendly (#561)
* enhance saving * remove console * rename * duplicate when saving others' projects * fix a bug
This commit is contained in:
parent
61560b87f7
commit
287663494a
1 changed files with 5 additions and 1 deletions
|
@ -157,6 +157,10 @@ class IDEView extends React.Component {
|
|||
e.stopPropagation();
|
||||
if (this.isUserOwner() || (this.props.user.authenticated && !this.props.project.owner)) {
|
||||
this.props.saveProject();
|
||||
} else if (this.props.user.authenticated) {
|
||||
this.props.cloneProject();
|
||||
} else {
|
||||
this.props.showErrorModal('forceAuthentication');
|
||||
}
|
||||
// 13 === enter
|
||||
} else if (e.keyCode === 13 && e.shiftKey && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
|
||||
|
@ -486,10 +490,10 @@ class IDEView extends React.Component {
|
|||
<Overlay
|
||||
title="Error"
|
||||
ariaLabel="error"
|
||||
closeOverlay={this.props.hideErrorModal}
|
||||
>
|
||||
<ErrorModal
|
||||
type={this.props.ide.errorType}
|
||||
closeModal={this.props.hideErrorModal}
|
||||
/>
|
||||
</Overlay>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue