From 287663494a6ba055fa22e7af46fa5432422d3501 Mon Sep 17 00:00:00 2001 From: "Mr.tang" <1074461480@qq.com> Date: Sat, 24 Feb 2018 00:55:14 +0800 Subject: [PATCH] Make saving more user-friendly (#561) * enhance saving * remove console * rename * duplicate when saving others' projects * fix a bug --- client/modules/IDE/pages/IDEView.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 0f0ebf83..ac9e1a78 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -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 { }