chore(ApplicationLayout):

remove SIDEBAR_ADD_FILE_TO_BUCKET components

- fix overflow issue in the header

- remove fileLoading instances
This commit is contained in:
Aminejv 2021-09-15 19:21:39 +01:00 committed by Martina
parent 2128df489a
commit 858920feb9

View File

@ -84,11 +84,10 @@ const STYLES_MODAL = css`
top: ${Constants.sizes.header}px;
right: 0;
bottom: 0;
width: 100vw;
height: calc(100vh - ${Constants.sizes.header}px);
position: fixed;
left: 0;
padding: 24px 24px 32px;
height: calc(100vh - ${Constants.sizes.header}px);
background-color: ${Constants.semantic.bgBlurWhiteOP};
@ -188,34 +187,6 @@ export default class ApplicationLayout extends React.Component {
render() {
let sidebarElements = null;
if (this.props.sidebar) {
if (this.props.sidebarName === "SIDEBAR_ADD_FILE_TO_BUCKET") {
sidebarElements = (
<div css={STYLES_MODAL}>
<Boundary
onMouseDown
captureResize={false}
captureScroll={false}
enabled
onOutsideRectEvent={this._handleDismiss}
style={{ height: "100%" }}
>
<div
css={STYLES_MODAL_ELEMENTS}
ref={(c) => {
this._sidebar = c;
}}
>
<div css={STYLES_SIDEBAR_HEADER} style={{ position: "absolute", right: 24 }}>
<div css={STYLES_DISMISS} onClick={this._handleDismiss}>
<SVG.Dismiss height="24px" />
</div>
</div>
{this.props.sidebar}
</div>
</Boundary>
</div>
);
} else {
sidebarElements = (
<Boundary
onMouseDown
@ -242,20 +213,14 @@ export default class ApplicationLayout extends React.Component {
</Boundary>
);
}
}
return (
<React.Fragment>
<div css={STYLES_CONTENT}>
<GlobalTooltip />
{this.props.header && (
<>
<div style={{ visibility: "hidden" }}>{this.props.header}</div>
<div
css={STYLES_HEADER}
style={{ top: this.props.isMobile ? this.state.headerTop : null }}
>
{this.props.header}
</div>
<div style={{ height: Constants.sizes.header }} />
<div css={STYLES_HEADER}>{this.props.header}</div>
</>
)}
<Alert
@ -266,7 +231,6 @@ export default class ApplicationLayout extends React.Component {
? this.props.viewer.onboarding.hidePrivacyAlert
: false
}
fileLoading={this.props.fileLoading}
onAction={this.props.onAction}
id={this.props.isMobile ? "slate-mobile-alert" : null}
viewer={this.props.viewer}