Skip to content
Snippets Groups Projects
Commit 14b9c17e authored by Ben Wheeler's avatar Ben Wheeler
Browse files

renamed doStoreProject; moved menubar z-index positioning to gui

parent 3ba65eaa
Branches
Tags
No related merge requests found
......@@ -279,6 +279,12 @@ $fade-out-distance: 15px;
margin-top: 0;
}
/* Menu */
.menu-bar-position {
position: relative;
z-index: $z-index-menu-bar;
}
/* Alerts */
.alerts-container {
......
......@@ -64,7 +64,6 @@ const GUIComponent = props => {
children,
costumeLibraryVisible,
costumesTabVisible,
doStoreProject,
enableCommunity,
importInfoVisible,
intl,
......@@ -166,7 +165,7 @@ const GUIComponent = props => {
) : null}
<MenuBar
accountNavOpen={accountNavOpen}
doStoreProject={doStoreProject}
className={styles.menuBarPosition}
enableCommunity={enableCommunity}
renderLogin={renderLogin}
userOwnsProject={userOwnsProject}
......@@ -312,7 +311,6 @@ GUIComponent.propTypes = {
children: PropTypes.node,
costumeLibraryVisible: PropTypes.bool,
costumesTabVisible: PropTypes.bool,
doStoreProject: PropTypes.func,
enableCommunity: PropTypes.bool,
importInfoVisible: PropTypes.bool,
intl: intlShape.isRequired,
......
......@@ -3,7 +3,6 @@
@import "../../css/z-index.css";
.menu-bar {
position: relative;
display: flex;
flex-direction: row;
justify-content: space-between;
......@@ -30,7 +29,6 @@
font-weight: bold;
background-color: $motion-primary;
color: $ui-white;
z-index: $z-index-menu-bar;
}
.main-menu {
......
......@@ -236,9 +236,11 @@ class MenuBar extends React.Component {
);
return (
<Box
className={classNames(styles.menuBar, {
[styles.saveInProgress]: this.state.projectSaveInProgress
})}
className={classNames(
this.props.className,
styles.menuBar,
{[styles.saveInProgress]: this.state.projectSaveInProgress}
)}
>
<div className={styles.mainMenu}>
<div className={styles.fileGroup}>
......@@ -288,8 +290,6 @@ class MenuBar extends React.Component {
place={this.props.isRtl ? 'left' : 'right'}
onRequestClose={this.props.onRequestCloseFile}
>
{/* note that it does not matter whether user is logged in or not, or
gui player is embedded or standalone */}
<MenuItem
isRtl={this.props.isRtl}
onClick={this.handleClickNew}
......@@ -617,7 +617,7 @@ class MenuBar extends React.Component {
MenuBar.propTypes = {
accountMenuOpen: PropTypes.bool,
doStoreProject: PropTypes.func,
className: PropTypes.string,
editMenuOpen: PropTypes.bool,
enableCommunity: PropTypes.bool,
fileMenuOpen: PropTypes.bool,
......
......@@ -20,14 +20,14 @@ const ProjectSaverHOC = function (WrappedComponent) {
constructor (props) {
super(props);
bindAll(this, [
'doStoreProject'
'storeProject' // NOTE: do i need to bind this?
]);
this.state = {
};
}
componentWillReceiveProps (nextProps) {
if (nextProps.isSavingWithId && !this.props.isSavingWithId) {
this.doStoreProject({
this.storeProject({
action: 'update',
id: nextProps.reduxProjectId
})
......@@ -41,7 +41,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
});
}
if (nextProps.isCreatingNew && !this.props.isCreatingNew) {
this.doStoreProject({
this.storeProject({
action: 'create'
})
.then(response => {
......@@ -53,7 +53,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
});
}
}
doStoreProject (opts) {
storeProject (opts) {
return this.props.vm.saveProjectSb3()
.then(content => {
const assetType = storage.AssetType.Project;
......@@ -85,7 +85,6 @@ const ProjectSaverHOC = function (WrappedComponent) {
} = this.props;
return (
<WrappedComponent
doStoreProject={this.doStoreProject}
{...componentProps}
/>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment