2020-08-17 21:07:16 +01:00
|
|
|
import React from 'react'
|
2020-08-17 21:59:29 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2020-05-14 07:03:22 +01:00
|
|
|
import { injectIntl, defineMessages } from 'react-intl'
|
|
|
|
import { URL_GAB_PRO } from '../../constants'
|
|
|
|
import PanelLayout from './panel_layout';
|
|
|
|
import Button from '../button'
|
2020-07-25 00:51:57 +01:00
|
|
|
import Icon from '../icon'
|
2020-05-14 07:03:22 +01:00
|
|
|
import Text from '../text'
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
title: { id: 'promo.gab_pro', defaultMessage: 'Upgrade to GabPRO' },
|
|
|
|
text: { id: 'pro_upgrade_modal.text_sm', defaultMessage: 'Please consider supporting us on our mission to defend free expression online for all people.' },
|
|
|
|
})
|
|
|
|
|
|
|
|
export default
|
|
|
|
@injectIntl
|
2020-08-17 21:07:16 +01:00
|
|
|
class ProPanel extends React.PureComponent {
|
2020-05-14 07:03:22 +01:00
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
isPro: PropTypes.bool.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const { intl, isPro } = this.props
|
|
|
|
|
2020-05-15 04:36:10 +01:00
|
|
|
if (isPro) return null
|
2020-05-14 07:03:22 +01:00
|
|
|
|
2020-07-25 00:51:57 +01:00
|
|
|
const title = (
|
|
|
|
<span className={[_s.default, _s.flexRow, _s.justifyContentCenter, _s.alignItemsCenter].join(' ')}>
|
|
|
|
<span className={[_s.default, _s.mr2].join(' ')}>
|
|
|
|
Upgrade to Gab
|
|
|
|
</span>
|
|
|
|
<span className={[_s.bgPro, _s.colorBlack, _s.radiusSmall, _s.px5, _s.py5].join(' ')}>PRO</span>
|
|
|
|
</span>
|
|
|
|
)
|
|
|
|
|
2020-05-14 07:03:22 +01:00
|
|
|
return (
|
|
|
|
<PanelLayout
|
2020-07-25 00:51:57 +01:00
|
|
|
title={title}
|
2020-05-14 07:03:22 +01:00
|
|
|
subtitle={intl.formatMessage(messages.text)}
|
|
|
|
>
|
2020-07-25 00:51:57 +01:00
|
|
|
|
|
|
|
<div className={[_s.default, _s.flexRow, _s.pb5].join(' ')}>
|
|
|
|
<Button
|
|
|
|
isOutline
|
|
|
|
color='brand'
|
|
|
|
backgroundColor='none'
|
|
|
|
href={URL_GAB_PRO}
|
|
|
|
className={[_s.flexRow, _s.alignItemsCenter, _s.justifyContentCenter, _s.mr10].join(' ')}
|
2020-05-14 07:03:22 +01:00
|
|
|
>
|
2020-07-25 00:51:57 +01:00
|
|
|
<Text color='inherit' weight='medium' align='center'>
|
|
|
|
Learn more
|
|
|
|
</Text>
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
href={URL_GAB_PRO}
|
|
|
|
className={[_s.flexRow, _s.flexGrow1, _s.alignItemsCenter, _s.justifyContentCenter].join(' ')}
|
|
|
|
>
|
|
|
|
<Text color='inherit' size='large' weight='bold' align='center'>
|
|
|
|
Upgrade
|
|
|
|
</Text>
|
2020-08-17 17:56:52 +01:00
|
|
|
<Icon id='arrow-right' size='20px' className={[_s.colorWhite, _s.ml5].join(' ')} />
|
2020-07-25 00:51:57 +01:00
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
|
2020-05-14 07:03:22 +01:00
|
|
|
</PanelLayout>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|