diff --git a/client/modules/IDE/components/NewFileModal.js b/client/modules/IDE/components/NewFileModal.js
index 0c299203..91a37740 100644
--- a/client/modules/IDE/components/NewFileModal.js
+++ b/client/modules/IDE/components/NewFileModal.js
@@ -15,7 +15,7 @@ import FileUploader from './FileUploader';
function NewFileModal(props) {
const modalClass = classNames({
modal: true,
- 'modal--hidden': !props.isVisible
+ 'modal--reduced': !props.canUploadMedia
});
return (
@@ -28,16 +28,25 @@ function NewFileModal(props) {
-
OR
-
+ {(() => {
+ if (props.canUploadMedia) {
+ return (
+
+ );
+ }
+ return '';
+ })()}
);
}
NewFileModal.propTypes = {
- isVisible: PropTypes.bool.isRequired,
- closeModal: PropTypes.func.isRequired
+ closeModal: PropTypes.func.isRequired,
+ canUploadMedia: PropTypes.bool.isRequired
};
function mapStateToProps(state) {
diff --git a/client/modules/IDE/pages/IDEView.js b/client/modules/IDE/pages/IDEView.js
index b5a40357..b29bd5ea 100644
--- a/client/modules/IDE/pages/IDEView.js
+++ b/client/modules/IDE/pages/IDEView.js
@@ -90,7 +90,7 @@ class IDEView extends React.Component {
if (this.props.ide.modalIsVisible) {
return (
);
@@ -107,7 +107,9 @@ IDEView.propTypes = {
project_id: PropTypes.string
}),
getProject: PropTypes.func.isRequired,
- user: PropTypes.object.isRequired,
+ user: PropTypes.shape({
+ authenticated: PropTypes.bool.isRequired
+ }).isRequired,
createProject: PropTypes.func.isRequired,
saveProject: PropTypes.func.isRequired,
ide: PropTypes.shape({
diff --git a/client/styles/components/_modal.scss b/client/styles/components/_modal.scss
index 297b4e3f..5a45b183 100644
--- a/client/styles/components/_modal.scss
+++ b/client/styles/components/_modal.scss
@@ -5,16 +5,15 @@
z-index: 100;
}
-.modal--hidden {
- display: none;
-}
-
.modal-content {
border: 1px solid $light-modal-border-color;
background-color: $light-button-background-color;
height: #{400 / $base-font-size}rem;
width: #{400 / $base-font-size}rem;
padding: #{20 / $base-font-size}rem;
+ .modal--reduced & {
+ height: #{150 / $base-font-size}rem;
+ }
}
.modal__exit-button {