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` const StyledArticleBody = styled.div`
${(props) => props.displayBorder && `outline: 1px dotted;`} ${(props) => props.displayBorder && `outline: 1px dotted;`}
flex-grow: 1; flex-grow: 1;
height: 100%;
${(props) => (props.isDesktop ? "height:auto" : "height:100%")};
.custom-scrollbar { .custom-scrollbar {
width: calc(100% + 24px) !important; width: calc(100% + 24px) !important;
} }

View File

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