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,48 +213,31 @@ 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>
{ <div>
!!me && <Button
<div> isOutline
<Button icon='ellipsis'
isOutline iconSize='18px'
icon='ellipsis' iconClassName={_s.inheritFill}
iconSize='18px' color='brand'
iconClassName={_s.inheritFill} backgroundColor='none'
color='brand' className={[_s.justifyContentCenter, _s.alignItemsCenter, _s.px10].join(' ')}
backgroundColor='none' onClick={this.handleOpenMore}
className={[_s.justifyContentCenter, _s.alignItemsCenter, _s.px10].join(' ')} buttonRef={this.setOpenMoreNodeRef}
onClick={this.handleOpenMore} />
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>