Updated profile header

• Updated:
- profile header to remove chat button and reformat on mobile
This commit is contained in:
mgabdev 2020-05-29 18:12:35 -04:00
parent 68cf20820c
commit 55671942b1

View File

@ -144,6 +144,16 @@ class ProfileHeader extends ImmutablePureComponent {
mtNeg50PX: !headerMissing, mtNeg50PX: !headerMissing,
}) })
const mobileDescriptionContainerClasses = CX({
default: 1,
width100PC: 1,
px15: 1,
mt5: !!me,
mb10: 1,
pt15: !!me,
pb10: 1,
})
return ( return (
<div className={[_s.default, _s.z1, _s.width100PC].join(' ')}> <div className={[_s.default, _s.z1, _s.width100PC].join(' ')}>
<Responsive max={BREAKPOINT_EXTRA_SMALL}> <Responsive max={BREAKPOINT_EXTRA_SMALL}>
@ -203,29 +213,13 @@ class ProfileHeader extends ImmutablePureComponent {
} }
{ {
account && account.get('id') !== me && account && account.get('id') !== me && !!me &&
<div className={[_s.default, _s.flexRow, _s.py5].join(' ')}> <div className={[_s.default, _s.flexRow, _s.py5].join(' ')}>
<form action='https://chat.gab.com/private-message' method='POST'>
<Button
isOutline
type='submit'
icon='chat'
iconSize='18px'
iconClassName={_s.inheritFill}
color='brand'
backgroundColor='none'
className={[_s.justifyContentCenter, _s.alignItemsCenter, _s.mr10, _s.px10].join(' ')}
/>
<input type='hidden' value={account.get('username')} name='username' />
</form>
<div className={[_s.default, _s.flexRow, _s.mr10].join(' ')}> <div className={[_s.default, _s.flexRow, _s.mr10].join(' ')}>
<AccountActionButton account={account} /> <AccountActionButton account={account} />
</div> </div>
{
!!me &&
<div> <div>
<Button <Button
isOutline isOutline
@ -239,12 +233,11 @@ class ProfileHeader extends ImmutablePureComponent {
buttonRef={this.setOpenMoreNodeRef} buttonRef={this.setOpenMoreNodeRef}
/> />
</div> </div>
}
</div> </div>
} }
<div className={[_s.default, _s.width100PC, _s.px15, _s.mt15, _s.mb10, _s.pt15, _s.pb10].join(' ')}> <div className={mobileDescriptionContainerClasses}>
{children} {children}
</div> </div>
@ -341,20 +334,6 @@ class ProfileHeader extends ImmutablePureComponent {
</div> </div>
} }
<form action='https://chat.gab.com/private-message' method='POST'>
<Button
isOutline
type='submit'
icon='chat'
iconSize='18px'
iconClassName={_s.inheritFill}
color='brand'
backgroundColor='none'
className={[_s.justifyContentCenter, _s.alignItemsCenter, _s.mr10, _s.px10].join(' ')}
/>
<input type='hidden' value={account.get('username')} name='username' />
</form>
<div className={[_s.default, _s.flexRow, _s.pb3].join(' ')}> <div className={[_s.default, _s.flexRow, _s.pb3].join(' ')}>
<AccountActionButton account={account} /> <AccountActionButton account={account} />
</div> </div>