Browse Source

Removes footer if no content visible on install/uninstall;

Fixes inner scroll for operationdetails;
develop
Juan Cortes Ross 6 years ago
parent
commit
14498f1c9e
No known key found for this signature in database GPG Key ID: 34A99C03E9455EB8
  1. 10
      src/components/ManagerPage/AppsList.js
  2. 2
      src/components/base/Modal/ModalContent.js

10
src/components/ManagerPage/AppsList.js

@ -225,26 +225,25 @@ class AppsList extends PureComponent<Props, State> {
renderFooter = () => { renderFooter = () => {
const { t } = this.props const { t } = this.props
const { status } = this.state return (
return ['error', 'success'].includes(status) ? (
<Box horizontal justifyContent="flex-end" style={{ width: '100%' }}> <Box horizontal justifyContent="flex-end" style={{ width: '100%' }}>
<Button primary onClick={this.handleCloseModal}> <Button primary onClick={this.handleCloseModal}>
{t('common.close')} {t('common.close')}
</Button> </Button>
</Box> </Box>
) : null )
} }
renderModal = () => { renderModal = () => {
const { status } = this.state const { status } = this.state
return ( return (
<Modal isOpened={status !== 'idle' && status !== 'loading'}> <Modal isOpened={status !== 'idle' && status !== 'loading'} centered>
<ModalBody <ModalBody
align="center" align="center"
justify="center" justify="center"
title={''} title={''}
render={this.renderBody} render={this.renderBody}
renderFooter={this.renderFooter} renderFooter={['error', 'success'].includes(status) ? this.renderFooter : undefined}
> >
<FreezeDeviceChangeEvents /> <FreezeDeviceChangeEvents />
</ModalBody> </ModalBody>
@ -295,6 +294,7 @@ class AppsList extends PureComponent<Props, State> {
render() { render() {
const { t } = this.props const { t } = this.props
return ( return (
<Box flow={6}> <Box flow={6}>
<Box> <Box>

2
src/components/base/Modal/ModalContent.js

@ -39,7 +39,7 @@ class ModalContent extends PureComponent<{
const contentStyle = { const contentStyle = {
...CONTENT_STYLE, ...CONTENT_STYLE,
overflow: noScroll ? 'visible' : 'inherit', overflow: noScroll ? 'visible' : 'auto',
} }
return ( return (

Loading…
Cancel
Save