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();
|
e.stopPropagation();
|
||||||
if (this.isUserOwner() || (this.props.user.authenticated && !this.props.project.owner)) {
|
if (this.isUserOwner() || (this.props.user.authenticated && !this.props.project.owner)) {
|
||||||
this.props.saveProject();
|
this.props.saveProject();
|
||||||
|
} else if (this.props.user.authenticated) {
|
||||||
|
this.props.cloneProject();
|
||||||
|
} else {
|
||||||
|
this.props.showErrorModal('forceAuthentication');
|
||||||
}
|
}
|
||||||
// 13 === enter
|
// 13 === enter
|
||||||
} else if (e.keyCode === 13 && e.shiftKey && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
|
} 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
|
<Overlay
|
||||||
title="Error"
|
title="Error"
|
||||||
ariaLabel="error"
|
ariaLabel="error"
|
||||||
closeOverlay={this.props.hideErrorModal}
|
|
||||||
>
|
>
|
||||||
<ErrorModal
|
<ErrorModal
|
||||||
type={this.props.ide.errorType}
|
type={this.props.ide.errorType}
|
||||||
|
closeModal={this.props.hideErrorModal}
|
||||||
/>
|
/>
|
||||||
</Overlay>
|
</Overlay>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue