Merge branch 'hotfix/v1.0.1' into feature/desktop-login

This commit is contained in:
Ilya Oleshko 2021-11-03 16:55:44 +03:00
commit 5d953407ad
2 changed files with 10 additions and 2 deletions

View File

@ -9,8 +9,8 @@ import { isMobile } from "react-device-detect";
const StyledArticleBody = styled.div`
${(props) => props.displayBorder && `outline: 1px dotted;`}
flex-grow: 1;
height: 100%;
${(props) => (props.isDesktop ? "height:auto" : "height:100%")};
.custom-scrollbar {
width: calc(100% + 24px) !important;
}

View File

@ -18,7 +18,9 @@ const paddingStyles = css`
`;
const commonStyles = css`
flex-grow: 1;
${(props) => !props.withScroll && `height: 100%;`}
${(props) => (props.isDesktop ? "height: auto" : "height: 100%")};
border-left: none;
-webkit-user-select: none;
@ -140,6 +142,7 @@ class SectionBody extends React.Component {
viewAs,
withScroll,
isLoaded,
isDesktop,
} = this.props;
const focusProps = autoFocus
@ -157,6 +160,7 @@ class SectionBody extends React.Component {
viewAs={viewAs}
pinned={pinned}
isLoaded={isLoaded}
isDesktop={isDesktop}
className="section-body"
>
{withScroll ? (
@ -190,6 +194,7 @@ class SectionBody extends React.Component {
withScroll={withScroll}
pinned={pinned}
isLoaded={isLoaded}
isDesktop={isDesktop}
>
{withScroll ? (
!isMobile ? (
@ -242,7 +247,10 @@ SectionBody.defaultProps = {
};
export default inject(({ auth }) => {
const { settingsStore } = auth;
const { isDesktopClient: isDesktop } = settingsStore;
return {
isLoaded: auth.isLoaded,
isDesktop,
};
})(observer(SectionBody));