Browse Source

Merge pull request #1 from meriadec/polish-on-modals

Various polishes on Modal refactoring
develop
Juan Cortés Ross 6 years ago
committed by GitHub
parent
commit
7c92f44623
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/base/Modal/ModalBody.js
  2. 15
      src/components/modals/AccountSettingRenderBody.js
  3. 5
      src/components/modals/ReleaseNotes/ReleaseNotesBody.js
  4. 1
      src/main/app.js

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

@ -90,7 +90,7 @@ const GRADIENT_STYLE = {
position: 'absolute', position: 'absolute',
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 6, right: 20,
} }
const GRADIENT_WRAPPER_STYLE = { const GRADIENT_WRAPPER_STYLE = {

15
src/components/modals/AccountSettingRenderBody.js

@ -23,6 +23,7 @@ import TrackPage from 'analytics/TrackPage'
import Spoiler from 'components/base/Spoiler' import Spoiler from 'components/base/Spoiler'
import CryptoCurrencyIcon from 'components/CryptoCurrencyIcon' import CryptoCurrencyIcon from 'components/CryptoCurrencyIcon'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import Space from 'components/base/Space'
import Button from 'components/base/Button' import Button from 'components/base/Button'
import Input from 'components/base/Input' import Input from 'components/base/Input'
import Select from 'components/base/Select' import Select from 'components/base/Select'
@ -203,7 +204,6 @@ class AccountSettingRenderBody extends PureComponent<Props, State> {
return ( return (
<ModalBody <ModalBody
noScroll
onClose={onClose} onClose={onClose}
title={t('account.settings.title')} title={t('account.settings.title')}
render={() => ( render={() => (
@ -266,8 +266,7 @@ class AccountSettingRenderBody extends PureComponent<Props, State> {
) : null} ) : null}
<Spoiler textTransform title={t('account.settings.advancedLogs')}> <Spoiler textTransform title={t('account.settings.advancedLogs')}>
<SyncAgo date={account.lastSyncDate} /> <SyncAgo date={account.lastSyncDate} />
<textarea <div
readOnly
style={{ style={{
userSelect: 'text', userSelect: 'text',
border: '1px dashed #f9f9f9', border: '1px dashed #f9f9f9',
@ -275,13 +274,16 @@ class AccountSettingRenderBody extends PureComponent<Props, State> {
color: '#000', color: '#000',
fontFamily: 'monospace', fontFamily: 'monospace',
fontSize: '10px', fontSize: '10px',
height: 200,
outline: 'none', outline: 'none',
padding: '20px', padding: '20px',
width: '100%', width: '100%',
whiteSpace: 'pre-wrap',
wordWrap: 'break-word',
overflow: 'auto',
}} }}
value={JSON.stringify(usefulData, null, 2)} >
/> {JSON.stringify(usefulData, null, 2)}
</div>
</Spoiler> </Spoiler>
<ConfirmModal <ConfirmModal
analyticsName="RemoveAccount" analyticsName="RemoveAccount"
@ -294,6 +296,7 @@ class AccountSettingRenderBody extends PureComponent<Props, State> {
subTitle={t('common.areYouSure')} subTitle={t('common.areYouSure')}
desc={t('settings.removeAccountModal.desc')} desc={t('settings.removeAccountModal.desc')}
/> />
<Space of={20} />
</Fragment> </Fragment>
)} )}
renderFooter={() => ( renderFooter={() => (

5
src/components/modals/ReleaseNotes/ReleaseNotesBody.js

@ -7,7 +7,6 @@ import network from 'api/network'
import Button from 'components/base/Button' import Button from 'components/base/Button'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import GrowScroll from 'components/base/GrowScroll'
import Text from 'components/base/Text' import Text from 'components/base/Text'
import Spinner from 'components/base/Spinner' import Spinner from 'components/base/Spinner'
import GradientBox from 'components/GradientBox' import GradientBox from 'components/GradientBox'
@ -121,9 +120,9 @@ class ReleaseNotesBody extends PureComponent<Props, State> {
render={() => ( render={() => (
<Box relative style={{ height: 500 }} px={0} pb={0}> <Box relative style={{ height: 500 }} px={0} pb={0}>
<TrackPage category="Modal" name="ReleaseNotes" /> <TrackPage category="Modal" name="ReleaseNotes" />
<GrowScroll px={5} pb={8}> <Box px={5} pb={8}>
{this.renderContent()} {this.renderContent()}
</GrowScroll> </Box>
<GradientBox /> <GradientBox />
</Box> </Box>
)} )}

1
src/main/app.js

@ -84,6 +84,7 @@ const defaultWindowOptions = {
backgroundColor: '#fff', backgroundColor: '#fff',
webPreferences: { webPreferences: {
blinkFeatures: 'OverlayScrollbars',
devTools, devTools,
// Enable, among other things, the ResizeObserver // Enable, among other things, the ResizeObserver
experimentalFeatures: true, experimentalFeatures: true,

Loading…
Cancel
Save