Progress
This commit is contained in:
@@ -49,10 +49,13 @@ class PopoverBase extends ImmutablePureComponent {
|
||||
onOpen: PropTypes.func.isRequired,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
position: PropTypes.string,
|
||||
openPopoverType: PropTypes.number,
|
||||
openPopoverType: PropTypes.string,
|
||||
visible: PropTypes.bool,
|
||||
targetRef: PropTypes.node,
|
||||
innerRef: PropTypes.node,
|
||||
innerRef: PropTypes.oneOfType([
|
||||
PropTypes.node,
|
||||
PropTypes.func,
|
||||
]),
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
@@ -124,7 +127,6 @@ class PopoverBase extends ImmutablePureComponent {
|
||||
|
||||
console.log('targetRef:', targetRef)
|
||||
|
||||
|
||||
return (
|
||||
<Manager>
|
||||
<Popper
|
||||
|
||||
@@ -145,10 +145,7 @@ class PopoverRoot extends PureComponent {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
type,
|
||||
props,
|
||||
} = this.props
|
||||
const { type, props } = this.props
|
||||
const visible = !!type
|
||||
|
||||
console.log("POPOVER_COMPONENTS[type]:", type, POPOVER_COMPONENTS[type]);
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { shortNumberFormat } from '../../utils/numbers'
|
||||
import PopoverLayout from './popover_layout'
|
||||
import Avatar from '../avatar'
|
||||
import Button from '../button'
|
||||
import DisplayName from '../display_name'
|
||||
import Text from '../text'
|
||||
|
||||
export default class RemoteUserInfoPopover extends ImmutablePureComponent {
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { account } = this.props
|
||||
|
||||
const content = !account ? null : { __html: account.get('note_emojified') }
|
||||
|
||||
return (
|
||||
<PopoverLayout>
|
||||
<div className={[_s.default, _s.px15, _s.py15].join(' ')} style={{width: '260px'}}>
|
||||
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={[_s.default, _s.flexGrow1].join(' ')}>
|
||||
<Avatar account={account} size={42} />
|
||||
<DisplayName account={account} multiline noHover />
|
||||
</div>
|
||||
<div className={[_s.default, _s.marginLeftAuto].join(' ')}>
|
||||
<Button
|
||||
color='white'
|
||||
>
|
||||
<Text size='medium' weight='bold' color='inherit'>
|
||||
Following
|
||||
</Text>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={[_s.default, _s.my10].join(' ')}>
|
||||
<div className={_s.dangerousContent} dangerouslySetInnerHTML={content} />
|
||||
</div>
|
||||
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div>
|
||||
<Text size='small'>
|
||||
{shortNumberFormat(account.get('following_count'))}
|
||||
Following
|
||||
</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text size='small'>
|
||||
{shortNumberFormat(account.get('followers_count'))}
|
||||
Followers
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</PopoverLayout>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ class StatusVisibilityDropdown extends PureComponent {
|
||||
onClick={() => this.handleChange(option.value)}
|
||||
className={containerClasses}
|
||||
>
|
||||
<Icon id={option.icon} height='16px' width='16px' className={iconClasses} />
|
||||
<Icon id={option.icon} size='16px' className={iconClasses} />
|
||||
<div className={[_s.default, _s.px10, _s.pt2].join(' ')}>
|
||||
<Text size='medium' color={isActive ? 'white' : 'primary'}>
|
||||
{option.title}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { shortNumberFormat } from '../../utils/numbers'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import PopoverLayout from './popover_layout'
|
||||
import AccountActionButton from '../account_action_button'
|
||||
import Avatar from '../avatar'
|
||||
import Button from '../button'
|
||||
import DisplayName from '../display_name'
|
||||
import Text from '../text'
|
||||
|
||||
export default class UserInfoPopover extends ImmutablePureComponent {
|
||||
static propTypes = {
|
||||
@@ -16,46 +15,32 @@ export default class UserInfoPopover extends ImmutablePureComponent {
|
||||
const { account } = this.props
|
||||
|
||||
const content = !account ? null : { __html: account.get('note_emojified') }
|
||||
const to = !account ? '' : `/${account.get('acct')}`
|
||||
|
||||
// : todo : is remote
|
||||
|
||||
return (
|
||||
<PopoverLayout>
|
||||
<div className={[_s.default, _s.px15, _s.py15].join(' ')} style={{width: '260px'}}>
|
||||
<PopoverLayout width={280}>
|
||||
<div className={[_s.default, _s.width100PC, _s.px15, _s.py15].join(' ')}>
|
||||
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={[_s.default, _s.flexGrow1].join(' ')}>
|
||||
<NavLink
|
||||
to={to}
|
||||
className={[_s.default, _s.noUnderline, _s.flexGrow1].join(' ')}
|
||||
>
|
||||
<Avatar account={account} size={42} />
|
||||
<DisplayName account={account} multiline noHover />
|
||||
</div>
|
||||
</NavLink>
|
||||
|
||||
<div className={[_s.default, _s.marginLeftAuto].join(' ')}>
|
||||
<Button
|
||||
color='white'
|
||||
>
|
||||
<Text size='medium' weight='bold' color='inherit'>
|
||||
Following
|
||||
</Text>
|
||||
</Button>
|
||||
<AccountActionButton account={account} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={[_s.default, _s.my10].join(' ')}>
|
||||
<div className={[_s.default, _s.mt10].join(' ')}>
|
||||
<div className={_s.dangerousContent} dangerouslySetInnerHTML={content} />
|
||||
</div>
|
||||
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div>
|
||||
<Text size='small'>
|
||||
{shortNumberFormat(account.get('following_count'))}
|
||||
Following
|
||||
</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text size='small'>
|
||||
{shortNumberFormat(account.get('followers_count'))}
|
||||
Followers
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</PopoverLayout>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user