From 2fb61afc05bc014c650db3636444017673a283b1 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Sun, 21 Oct 2018 22:18:41 -0400 Subject: [PATCH] added showComingSoon flag prop for gui --- src/components/gui/gui.jsx | 6 +- src/components/menu-bar/menu-bar.jsx | 108 ++++++++++++++------------- src/containers/gui.jsx | 1 - src/playground/render-gui.jsx | 1 + 4 files changed, 64 insertions(+), 52 deletions(-) diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx index 0ef0801a4..389f63d63 100644 --- a/src/components/gui/gui.jsx +++ b/src/components/gui/gui.jsx @@ -92,9 +92,10 @@ const GUIComponent = props => { onSeeCommunity, onShare, previewInfoVisible, - targetIsStage, + showComingSoon, soundsTabVisible, stageSizeMode, + targetIsStage, tipsLibraryVisible, vm, ...componentProps @@ -178,6 +179,7 @@ const GUIComponent = props => { className={styles.menuBarPosition} enableCommunity={enableCommunity} renderLogin={renderLogin} + showComingSoon={showComingSoon} onClickAccountNav={onClickAccountNav} onCloseAccountNav={onCloseAccountNav} onLogOut={onLogOut} @@ -351,6 +353,7 @@ GUIComponent.propTypes = { onUpdateProjectTitle: PropTypes.func, previewInfoVisible: PropTypes.bool, renderLogin: PropTypes.func, + showComingSoon: PropTypes.bool, soundsTabVisible: PropTypes.bool, stageSizeMode: PropTypes.oneOf(Object.keys(STAGE_SIZE_MODES)), targetIsStage: PropTypes.bool, @@ -369,6 +372,7 @@ GUIComponent.defaultProps = { canSaveAsCopy: false, canShare: false, onUpdateProjectTitle: () => {}, + showComingSoon: false, stageSizeMode: STAGE_SIZE_MODES.large }; diff --git a/src/components/menu-bar/menu-bar.jsx b/src/components/menu-bar/menu-bar.jsx index b0c831a05..462131b62 100644 --- a/src/components/menu-bar/menu-bar.jsx +++ b/src/components/menu-bar/menu-bar.jsx @@ -298,39 +298,39 @@ class MenuBar extends React.Component { > {newProjectMessage} - ) : ( + ) : (this.props.showComingSoon ? ( {newProjectMessage} - )} + ) : [])} {this.props.canSave ? ( {saveNowMessage} - ) : ( + ) : (this.props.showComingSoon ? ( {saveNowMessage} - )} + ) : [])} {this.props.canSaveAsCopy ? ( {saveAsCopyMessage} - ) : ( + ) : (this.props.showComingSoon ? ( {saveAsCopyMessage} - )} + ) : [])} @@ -438,13 +438,15 @@ class MenuBar extends React.Component {
{this.props.canShare ? shareButton : ( - - {shareButton} - + this.props.showComingSoon ? ( + + {shareButton} + + ) : [] )}
- {this.props.enableCommunity ? + {this.props.enableCommunity ? ( : + + ) : (this.props.showComingSoon ? ( - } + ) : [])}
@@ -572,44 +575,48 @@ class MenuBar extends React.Component { - -
- -
-
- -
- - - {'scratch-cat'} - - -
-
+ {this.props.showComingSoon ? ( + + +
+ +
+
+ +
+ + + {'scratch-cat'} + + +
+
+
+ ) : []} )} @@ -656,6 +663,7 @@ MenuBar.propTypes = { onUpdateProjectTitle: PropTypes.func, renderLogin: PropTypes.func, sessionExists: PropTypes.bool, + showComingSoon: PropTypes.bool, username: PropTypes.string }; diff --git a/src/containers/gui.jsx b/src/containers/gui.jsx index ffc38e07f..eeb3f83ce 100644 --- a/src/containers/gui.jsx +++ b/src/containers/gui.jsx @@ -109,7 +109,6 @@ GUI.propTypes = { isShowingProject: PropTypes.bool, loadingError: PropTypes.bool, loadingStateVisible: PropTypes.bool, - onChangeProjectInfo: PropTypes.func, onSeeCommunity: PropTypes.func, onUpdateProjectId: PropTypes.func, onUpdateProjectTitle: PropTypes.func, diff --git a/src/playground/render-gui.jsx b/src/playground/render-gui.jsx index 0a2f67dde..bc13e36f2 100644 --- a/src/playground/render-gui.jsx +++ b/src/playground/render-gui.jsx @@ -39,6 +39,7 @@ export default appTarget => { ReactDOM.render( , appTarget);