Updated SignUpPanel styles, Added to multiple pages/layouts

• Updated:
- SignUpPanel styles

• Added:
- SignupPanel to multiple pages/layouts
This commit is contained in:
mgabdev 2020-07-24 18:53:09 -05:00
parent a81f62ca52
commit f6966ff382
5 changed files with 34 additions and 5 deletions

View File

@ -1,24 +1,26 @@
import { injectIntl, defineMessages } from 'react-intl'
import { me } from '../../initial_state'
import Button from '../button'
import Text from '../text'
import PanelLayout from './panel_layout'
const messages = defineMessages({
title: { id: 'signup_panel.title', defaultMessage: 'New to Gab?' },
subtitle: { id: 'signup_panel.subtitle', defaultMessage: 'Sign up now to speak freely.' },
register: { id: 'account.register', defaultMessage: 'Sign up' },
login: { id: 'account.login', defaultMessage: 'Log in' },
})
export default
@injectIntl
class SignUpPanel extends PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,
}
render() {
// : TESTING :
if (!me) return null
if (me) return null
const { intl } = this.props
@ -27,10 +29,29 @@ class SignUpPanel extends PureComponent {
title={intl.formatMessage(messages.title)}
subtitle={intl.formatMessage(messages.subtitle)}
>
<Button href="/auth/sign_up">
{intl.formatMessage(messages.register)}
</Button>
<div className={[_s.default, _s.flexRow, _s.pb5].join(' ')}>
<Button
isOutline
color='brand'
backgroundColor='none'
href='/auth/sign_in'
className={[_s.flexRow, _s.alignItemsCenter, _s.justifyContentCenter, _s.mr10].join(' ')}
>
<Text color='inherit' weight='medium' align='center' className={_s.px10}>
{intl.formatMessage(messages.login)}
</Text>
</Button>
<Button
href='/auth/sign_up'
className={_s.flexGrow1}
>
<Text color='inherit' size='large' weight='bold' align='center'>
{intl.formatMessage(messages.register)}
</Text>
</Button>
</div>
</PanelLayout>
)
}
}

View File

@ -6,6 +6,7 @@ import Layout from './layout'
import GroupInfoPanel from '../components/panel/group_info_panel'
import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
import GroupSidebarPanel from '../components/panel/groups_panel'
import SignupPanel from '../components/panel/sign_up_panel'
import LinkFooter from '../components/link_footer'
import GroupHeader from '../components/group_header'
import SidebarPanelGroup from '../components/sidebar_panel_group'
@ -78,6 +79,7 @@ export default class GroupLayout extends ImmutablePureComponent {
page={`group.${groupId}`}
layout={[
<GroupInfoPanel group={group} key='group-page-info-panel' />,
<SignupPanel key='group-page-signup-panel' />,
<WhoToFollowPanel key='group-page-wtf-panel' />,
<GroupSidebarPanel isSlim key='group-page-group-panel' />,
<LinkFooter key='group-page-link-footer' />,

View File

@ -8,6 +8,7 @@ import LinkFooter from '../components/link_footer'
import ProfileStatsPanel from '../components/panel/profile_stats_panel'
import ProfileInfoPanel from '../components/panel/profile_info_panel'
import MediaGalleryPanel from '../components/panel/media_gallery_panel'
import SignUpPanel from '../components/panel/sign_up_panel'
import NavigationBar from '../components/navigation_bar'
import FooterBar from '../components/footer_bar'
import ProfileHeader from '../components/profile_header'
@ -118,6 +119,7 @@ export default class ProfileLayout extends ImmutablePureComponent {
<ProfileStatsPanel account={account} />
<ProfileInfoPanel account={account} />
{ !unavailable && <MediaGalleryPanel account={account} /> }
<SignUpPanel />
<LinkFooter />
</div>
</Sticky>

View File

@ -3,6 +3,7 @@ import DefaultLayout from '../layouts/default_layout'
import ProgressPanel from '../components/panel/progress_panel'
import VerifiedAccountsPanel from '../components/panel/verified_accounts_panel'
import ShopPanel from '../components/panel/shop_panel'
import SignupPanel from '../components/panel/sign_up_panel'
import LinkFooter from '../components/link_footer'
export default class ExplorePage extends PureComponent {
@ -22,6 +23,7 @@ export default class ExplorePage extends PureComponent {
noComposeButton
showBackBtn
layout={[
<SignupPanel key='explore-page-signup-panel' />,
<ProgressPanel key='explore-page-progress-panel' />,
<VerifiedAccountsPanel key='explore-page-verified-panel' />,
<ShopPanel key='explore-page-shop-panel' />,

View File

@ -5,6 +5,7 @@ import PageTitle from '../features/ui/util/page_title'
import LinkFooter from '../components/link_footer'
import SearchFilterPanel from '../components/panel/search_filter_panel'
import TrendsPanel from '../components/panel/trends_panel'
import SignupPanel from '../components/panel/sign_up_panel'
import Search from '../components/search'
import Layout from '../layouts/layout'
@ -64,6 +65,7 @@ class SearchPage extends PureComponent {
tabs={tabs}
page={`search.${qos}`}
layout={[
<SignupPanel key='search-page-signup-panel' />,
<SearchFilterPanel key='search-page-search-panel' />,
<TrendsPanel key='search-page-trends-panel' />,
<LinkFooter key='search-page-link-footer' />,