This commit is contained in:
mgabdev
2020-02-29 10:42:47 -05:00
parent 3ca4ffcc6b
commit c6aa4e08a1
190 changed files with 1156 additions and 1042 deletions

View File

@@ -36,6 +36,7 @@ class Account extends ImmutablePureComponent {
actionIcon: PropTypes.string,
actionTitle: PropTypes.string,
onActionClick: PropTypes.func,
compact: PropTypes.bool,
}
handleFollow = () => {
@@ -63,7 +64,15 @@ class Account extends ImmutablePureComponent {
}
render() {
const { account, intl, hidden, onActionClick, actionIcon, actionTitle } = this.props
const {
account,
intl,
hidden,
onActionClick,
actionIcon,
actionTitle,
compact
} = this.props
if (!account) return null
@@ -76,6 +85,7 @@ class Account extends ImmutablePureComponent {
)
}
const avatarSize = compact ? 42 : 52
let buttons
if (onActionClick && actionIcon) {
@@ -109,6 +119,50 @@ class Account extends ImmutablePureComponent {
}
}
// : todo : clean up
if (compact) {
return (
<div className={[_s.default, _s.marginTop5PX, _s.marginBottom15PX].join(' ')}>
<div className={[_s.default, _s.flexRow].join(' ')}>
<NavLink
className={[_s.default, _s.noUnderline].join(' ')}
title={account.get('acct')}
to={`/${account.get('acct')}`}
>
<Avatar account={account} size={avatarSize} />
</NavLink>
<div className={[_s.default, _s.alignItemsStart, _s.paddingHorizontal10PX].join(' ')}>
<NavLink
className={[_s.default, _s.noUnderline].join(' ')}
title={account.get('acct')}
to={`/${account.get('acct')}`}
>
<DisplayName account={account} multiline />
</NavLink>
</div>
<div className={[_s.default, _s.marginLeftAuto].join(' ')}>
<Button
outline
narrow
color='brand'
backgroundColor='none'
className={_s.marginTop5PX}
>
<Text color='inherit'>
{intl.formatMessage(messages.follow)}
</Text>
</Button>
</div>
</div>
</div>
)
}
return (
<div className={[_s.default, _s.marginTop5PX, _s.marginBottom15PX].join(' ')}>
<div className={[_s.default, _s.flexRow].join(' ')}>
@@ -118,7 +172,7 @@ class Account extends ImmutablePureComponent {
title={account.get('acct')}
to={`/${account.get('acct')}`}
>
<Avatar account={account} size={52} />
<Avatar account={account} size={avatarSize} />
</NavLink>
<div className={[_s.default, _s.alignItemsStart, _s.paddingHorizontal10PX].join(' ')}>
@@ -129,6 +183,7 @@ class Account extends ImmutablePureComponent {
>
<DisplayName account={account} />
</NavLink>
<Button
outline
narrow

View File

@@ -1 +1 @@
export { default } from './account';
export { default } from './account'

View File

@@ -1 +1 @@
export { default } from './autosuggest_account';
export { default } from './autosuggest_account'

View File

@@ -1 +1 @@
export { default } from './autosuggest_emoji';
export { default } from './autosuggest_emoji'

View File

@@ -1 +1 @@
export { default } from './autosuggest_textbox';
export { default } from './autosuggest_textbox'

View File

@@ -1 +1 @@
export { default } from './bundle_column_error';
export { default } from './bundle_column_error'

View File

@@ -81,6 +81,10 @@ export default class Button extends PureComponent {
const theIcon = !!icon ? <Icon id={icon} width={iconWidth} height={iconWidth} className={iconClassName} /> : undefined
if (backgroundColor === 'tertiary') {
console.log("className:", className)
}
// : todo :
const classes = cx(className, {
default: 1,
@@ -93,6 +97,7 @@ export default class Button extends PureComponent {
backgroundColorBrand: backgroundColor === COLORS.brand,
backgroundTransparent: backgroundColor === COLORS.none,
backgroundSubtle2: backgroundColor === COLORS.tertiary,
backgroundSubtle: backgroundColor === COLORS.secondary,
colorPrimary: color === COLORS.primary,
colorSecondary: color === COLORS.secondary,
@@ -131,9 +136,9 @@ export default class Button extends PureComponent {
) : children
const options = {
disabled,
className: classes,
ref: this.setRef,
disabled: disabled,
to: to || undefined,
href: href || undefined,
onClick: this.handleClick || undefined,

View File

@@ -1,5 +1,6 @@
import { defineMessages, injectIntl } from 'react-intl'
import Icon from './icon'
import Text from './text'
const messages = defineMessages({
loading: { id: 'loading_indicator.label', defaultMessage: 'Loading..' },
@@ -30,12 +31,16 @@ class ColumnIndicator extends PureComponent {
return (
<div className={[_s.default, _s.width100PC, _s.justifyContentCenter, _s.alignItemsCenter, _s.paddingVertical15PX].join(' ')}>
<Icon id={type} width='52px' height='52px' />
<Icon id={type} width='44px' height='44px' />
{
type !== 'loading' &&
<span className={[_s.default, _s.marginTop10PX, _s.text, _s.displayFlex, _s.colorBrand, _s.fontWeightNormal, _s.fontSize14PX].join(' ')}>
<Text
align='center'
size='medium'
className={_s.marginTop10PX}
>
{title}
</span>
</Text>
}
</div>
)

View File

@@ -1 +1 @@
export { default } from './column_inline_form';
export { default } from './column_inline_form'

View File

@@ -31,12 +31,12 @@ class DisplayName extends ImmutablePureComponent {
}
handleMouseEnter = debounce(() => {
console.log("SHOW - USER POPOVER")
this.props.openUserInfoPopover()
// console.log("SHOW - USER POPOVER")
// this.props.openUserInfoPopover()
}, 50, { leading: true })
handleMouseLeave = () => {
console.log("HIDE - USER POPOVER")
// console.log("HIDE - USER POPOVER")
// this.props.closeUserInfoPopover()
}

View File

@@ -1,7 +1,25 @@
import classnames from 'classnames/bind'
const cx = classnames.bind(_s)
export default class Divider extends PureComponent {
static propTypes = {
small: PropTypes.bool
}
render() {
const { small } = this.props
const classes = cx({
default: 1,
borderBottom1PX: 1,
borderColorSecondary2: 1,
width100PC: 1,
marginBottom15PX: !small,
marginVertical10PX: small,
})
return (
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary2, _s.marginBottom15PX, _s.width100PC].join(' ')} />
<div className={classes} />
)
}
}

View File

@@ -1 +1 @@
export { default } from './domain';
export { default } from './domain'

View File

@@ -1,10 +1,8 @@
import { FormattedMessage } from 'react-intl';
export default class ErrorBoundary extends PureComponent {
static propTypes = {
children: PropTypes.node,
};
}
state = {
hasError: false,
@@ -17,22 +15,23 @@ export default class ErrorBoundary extends PureComponent {
hasError: true,
stackTrace: error.stack,
componentStack: info && info.componentStack,
});
})
}
render() {
const { hasError } = this.state;
const { hasError } = this.state
if (!hasError) return this.props.children;
if (!hasError) return this.props.children
// : todo : custom error page
return (
<div className='error-boundary'>
<div className='error-boundary__container'>
<FormattedMessage id='alert.unexpected.message' defaultMessage='Error' />
<a className='error-boundary__link' href='/home'>Return Home</a>
</div>
</div>
);
)
}
}

View File

@@ -1 +1 @@
export { default } from './extended_video_player';
export { default } from './extended_video_player'

View File

@@ -1 +1 @@
export { default } from './footer_bar';
export { default } from './footer_bar'

View File

@@ -33,6 +33,8 @@ export default class Icon extends PureComponent {
return <I.DissenterIcon {...options} />
case 'ellipsis':
return <I.EllipsisIcon {...options} />
case 'error':
return <I.ErrorIcon {...options} />
case 'globe':
return <I.GlobeIcon {...options} />
case 'group':
@@ -41,16 +43,24 @@ export default class Icon extends PureComponent {
return <I.HomeIcon {...options} />
case 'like':
return <I.LikeIcon {...options} />
case 'link':
return <I.LinkIcon {...options} />
case 'list':
return <I.ListIcon {...options} />
case 'loading':
return <I.LoadingIcon {...options} />
case 'more':
return <I.MoreIcon {...options} />
case 'media':
return <I.MediaIcon {...options} />
case 'missing':
return <I.MissingIcon {...options} />
case 'more':
return <I.MoreIcon {...options} />
case 'notifications':
return <I.NotificationsIcon {...options} />
case 'pin':
return <I.PinIcon {...options} />
case 'play':
return <I.PlayIcon {...options} />
case 'poll':
return <I.PollIcon {...options} />
case 'repost':

View File

@@ -1 +1 @@
export { default } from './icon_button';
export { default } from './icon_button'

View File

@@ -1 +1 @@
export { default } from './image_loader';
export { default } from './image_loader'

View File

@@ -1,5 +1,4 @@
import classNames from 'classnames/bind'
import Button from './button'
import Icon from './icon'
const cx = classNames.bind(_s)

View File

@@ -1,5 +1,7 @@
import { injectIntl, defineMessages } from 'react-intl'
import Button from './button'
import Icon from './icon'
import Text from './text'
const messages = defineMessages({
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
@@ -31,16 +33,29 @@ class LoadMore extends PureComponent {
const { disabled, visible, gap, intl } = this.props
return (
<button
className={[_s.default].join(' ')}
<Button
block
radiusSmall
backgroundColor='tertiary'
color='primary'
disabled={disabled || !visible}
style={{ visibility: visible ? 'visible' : 'hidden' }}
onClick={this.handleClick}
aria-label={intl.formatMessage(messages.load_more)}
>
{!gap && intl.formatMessage(messages.load_more)}
{gap && <Icon id='ellipsis-h' />}
</button>
{
!gap &&
<Text color='inherit'>
{intl.formatMessage(messages.load_more)}
</Text>
}
{
gap &&
<Text align='center'>
<Icon id='ellipsis' />
</Text>
}
</Button>
)
}

View File

@@ -1 +1 @@
export { default } from './media_gallery';
export { default } from './media_gallery'

View File

@@ -6,6 +6,7 @@ import { cancelReplyCompose } from '../../actions/compose'
const messages = defineMessages({
confirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
delete: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },
})
const mapStateToProps = state => ({
@@ -58,7 +59,7 @@ class ModalBase extends PureComponent {
if (!composeId && composeText && type == 'COMPOSE') {
onOpenModal('CONFIRM', {
message: <FormattedMessage id='confirmations.delete.message' defaultMessage='Are you sure you want to delete this status?' />,
message: intl.formatMessage(messages.delete),
confirm: intl.formatMessage(messages.confirm),
onConfirm: () => onCancelReplyCompose(),
onCancel: () => onOpenModal('COMPOSE'),

View File

@@ -1,13 +1,18 @@
import { Fragment } from 'react'
import { defineMessages, injectIntl } from 'react-intl'
import ImmutablePureComponent from 'react-immutable-pure-component'
import ImmutablePropTypes from 'react-immutable-proptypes'
import { me } from '../../initial_state'
import { shortNumberFormat } from '../../utils/numbers'
import PanelLayout from './panel_layout'
import UserStat from '../user_stat'
import Button from '../button'
import Divider from '../divider'
import Heading from '../heading'
import Icon from '../icon'
import Text from '../text'
const messages = defineMessages({
title: { id: 'about', defaultMessage: 'About' },
members: { id: 'members', defaultMessage: 'Members' },
})
export default
@@ -24,7 +29,45 @@ class GroupInfoPanel extends ImmutablePureComponent {
return (
<PanelLayout title={intl.formatMessage(messages.title)}>
{
!!group &&
<Fragment>
<Heading size='h3'>
{group.get('title')}
</Heading>
<Divider small />
<div className={[_s.default, _s.flexRow, _s.justifyContentCenter].join(' ')}>
<div className={[_s.default, _s.flexRow, _s.alignItemsCenter].join(' ')}>
<Icon id='group' height='14px' width='14px' />
<Text size='small' className={_s.marginLeft5PX}>
{intl.formatMessage(messages.members)}
</Text>
</div>
<Button
text
to={`/groups/${group.get('id')}/members`}
color='brand'
backgroundColor='none'
className={_s.marginLeftAuto}
>
<Text color='inherit' weight='medium' size='normal' className={_s.underline_onHover}>
{shortNumberFormat(group.get('member_count'))}
&nbsp;
{intl.formatMessage(messages.members)}
</Text>
</Button>
</div>
<Divider small />
<Text>
{group.get('description')}
</Text>
</Fragment>
}
</PanelLayout>
)
}

View File

@@ -1,15 +1,14 @@
import { Fragment } from 'react'
import { defineMessages, injectIntl } from 'react-intl'
import { fetchSuggestions, dismissSuggestion } from '../../actions/suggestions'
import ImmutablePureComponent from 'react-immutable-pure-component'
import ImmutablePropTypes from 'react-immutable-proptypes'
import { List as ImmutableList } from 'immutable'
import classNames from 'classnames/bind'
import PanelLayout from './panel_layout'
import Divider from '../divider'
import Icon from '../icon'
import Text from '../text'
const cx = classNames.bind(_s)
const messages = defineMessages({
title: { id: 'about', defaultMessage: 'About' },
linkVerifiedOn: { id: 'account.link_verified_on', defaultMessage: 'Ownership of this link was checked on {date}' },
@@ -19,12 +18,12 @@ const messages = defineMessages({
})
const mapStateToProps = (state, { account }) => {
const identityProofs = !!account ? state.getIn(['identity_proofs', account.get('id')], ImmutableList()) : ImmutableList();
const identityProofs = !!account ? state.getIn(['identity_proofs', account.get('id')], ImmutableList()) : ImmutableList()
return {
identityProofs,
domain: state.getIn(['meta', 'domain']),
};
};
}
}
const mapDispatchToProps = dispatch => {
@@ -54,29 +53,9 @@ class ProfileInfoPanel extends ImmutablePureComponent {
const fields = !account ? null : account.get('fields')
const content = !account ? null : { __html: account.get('note_emojified') }
const memberSinceDate = !account ? null : intl.formatDate(account.get('created_at'), { month: 'long', year: 'numeric' });
const memberSinceDate = !account ? null : intl.formatDate(account.get('created_at'), { month: 'long', year: 'numeric' })
const hasNote = !!content ? (account.get('note').length > 0 && account.get('note') !== '<p></p>') : false
const lineClasses = cx({
default: 1,
flexRow: 1,
alignItemsCenter: 1,
borderTop1PX: 1,
borderColorSecondary: 1,
marginTop10PX: 1,
paddingTop10PX: 1,
})
const memberLineClasses = cx({
default: 1,
flexRow: 1,
alignItemsCenter: 1,
borderTop1PX: hasNote,
borderColorSecondary: hasNote,
marginTop10PX: hasNote,
paddingTop10PX: hasNote,
})
return (
<PanelLayout title={intl.formatMessage(messages.title)}>
{
@@ -84,10 +63,13 @@ class ProfileInfoPanel extends ImmutablePureComponent {
<div className={[_s.default].join(' ')}>
{
hasNote &&
<div className={_s.dangerousContent} dangerouslySetInnerHTML={content} />
<Fragment>
<div className={_s.dangerousContent} dangerouslySetInnerHTML={content} />
<Divider small />
</Fragment>
}
<div className={memberLineClasses}>
<div className={[_s.default, _s.flexRow, _s.alignItemsCenter].join(' ')}>
<Icon id='calendar' width='12px' height='12px' className={_s.fillcolorSecondary} />
<Text
size='small'
@@ -104,45 +86,50 @@ class ProfileInfoPanel extends ImmutablePureComponent {
{(fields.size > 0 || identityProofs.size > 0) && (
<div className={[_s.default]}>
{identityProofs.map((proof, i) => (
<dl className={lineClasses} key={`profile-identity-proof-${i}`}>
<dt
className={_s.dangerousContent}
dangerouslySetInnerHTML={{ __html: proof.get('provider') }}
/>
<Fragment>
<Divider small />
<dl className={[_s.default, _s.flexRow, _s.alignItemsCenter].join(' ')} key={`profile-identity-proof-${i}`}>
<dt
className={_s.dangerousContent}
dangerouslySetInnerHTML={{ __html: proof.get('provider') }}
/>
{ /* : todo : */ }
<dd className='verified'>
<a href={proof.get('proof_url')} target='_blank' rel='noopener'>
<span title={intl.formatMessage(messages.linkVerifiedOn, { date: intl.formatDate(proof.get('updated_at'), dateFormatOptions) })}>
<Icon id='check' className='verified__mark' />
</span>
</a>
<a href={proof.get('profile_url')} target='_blank' rel='noopener'>
<span
className={_s.dangerousContent}
dangerouslySetInnerHTML={{ __html: ' ' + proof.get('provider_username') }}
/>
</a>
</dd>
</dl>
{ /* : todo : */}
<dd className='verified'>
<a href={proof.get('proof_url')} target='_blank' rel='noopener'>
<span title={intl.formatMessage(messages.linkVerifiedOn, { date: intl.formatDate(proof.get('updated_at'), dateFormatOptions) })}>
<Icon id='check' className='verified__mark' />
</span>
</a>
<a href={proof.get('profile_url')} target='_blank' rel='noopener'>
<span
className={_s.dangerousContent}
dangerouslySetInnerHTML={{ __html: ' ' + proof.get('provider_username') }}
/>
</a>
</dd>
</dl>
</Fragment>
))}
{
fields.map((pair, i) => (
<dl className={lineClasses} key={`profile-field-${i}`}>
<dt
className={[_s.text, _s.dangerousContent].join('')}
dangerouslySetInnerHTML={{ __html: pair.get('name_emojified') }}
title={pair.get('name')}
/>
<dd
className={[_s.dangerousContent, _s.marginLeftAuto].join(' ')}
title={pair.get('value_plain')}
dangerouslySetInnerHTML={{ __html: pair.get('value_emojified') }}
/>
</dl>
<Fragment>
<Divider small />
<dl className={[_s.default, _s.flexRow, _s.alignItemsCenter].join(' ')} key={`profile-field-${i}`}>
<dt
className={[_s.text, _s.dangerousContent].join('')}
dangerouslySetInnerHTML={{ __html: pair.get('name_emojified') }}
title={pair.get('name')}
/>
<dd
className={[_s.dangerousContent, _s.marginLeftAuto].join(' ')}
title={pair.get('value_plain')}
dangerouslySetInnerHTML={{ __html: pair.get('value_emojified') }}
/>
</dl>
</Fragment>
))
}

View File

@@ -42,7 +42,7 @@ class WhoToFollowPanel extends ImmutablePureComponent {
const { intl, /* suggestions, */ dismissSuggestion } = this.props;
// : testing!!! :
const suggestions = [
"1",
"1","1","1",
]
// if (suggestions.isEmpty()) {
// return null;

View File

@@ -1 +1 @@
export { default } from './poll';
export { default } from './poll'

View File

@@ -135,10 +135,10 @@ class PopoverBase extends ImmutablePureComponent {
return (
<div onKeyDown={this.handleKeyDown} className={containerClasses}>
<div show={open} placement={popoverPlacement} target={this.findTarget}>
{ /* <PopoverMenu items={items} onClose={this.handleClose} openedViaKeyboard={openedViaKeyboard} /> */}
{ /* <div show={open} placement={popoverPlacement} target={this.findTarget}>
<PopoverMenu items={items} onClose={this.handleClose} openedViaKeyboard={openedViaKeyboard} />
{children}
</div>
</div> */}
</div>
)
}

View File

@@ -48,9 +48,9 @@ class PopoverRoot extends PureComponent {
onClose: PropTypes.func.isRequired,
}
getSnapshotBeforeUpdate() {
return { visible: !!this.props.type }
}
// getSnapshotBeforeUpdate() {
// return { visible: !!this.props.type }
// }
static contextTypes = {
router: PropTypes.object,
@@ -73,25 +73,25 @@ class PopoverRoot extends PureComponent {
}
handleDocumentClick = e => {
if (this.node && !this.node.contains(e.target)) {
this.props.onClose()
}
// if (this.node && !this.node.contains(e.target)) {
// this.props.onClose()
// }
}
componentDidMount() {
document.addEventListener('click', this.handleDocumentClick, false)
document.addEventListener('keydown', this.handleKeyDown, false)
document.addEventListener('touchend', this.handleDocumentClick, listenerOptions)
// document.addEventListener('click', this.handleDocumentClick, false)
// document.addEventListener('keydown', this.handleKeyDown, false)
// document.addEventListener('touchend', this.handleDocumentClick, listenerOptions)
if (this.focusedItem && this.props.openedViaKeyboard) this.focusedItem.focus()
// if (this.focusedItem && this.props.openedViaKeyboard) this.focusedItem.focus()
this.setState({ mounted: true })
// this.setState({ mounted: true })
}
componentWillUnmount() {
document.removeEventListener('click', this.handleDocumentClick, false)
document.removeEventListener('keydown', this.handleKeyDown, false)
document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions)
// document.removeEventListener('click', this.handleDocumentClick, false)
// document.removeEventListener('keydown', this.handleKeyDown, false)
// document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions)
}
setRef = c => {
@@ -159,13 +159,15 @@ class PopoverRoot extends PureComponent {
console.log("popover root - type, visible:", type, visible)
// <PopoverBase className={`popover-menu ${placement}`} visible={visible} ref={this.setRef}>
// {
// visible &&
// <UserInfoPopover />
// }
// </PopoverBase>
return (
<PopoverBase className={`popover-menu ${placement}`} visible={visible} ref={this.setRef}>
{
visible &&
<UserInfoPopover />
}
</PopoverBase>
<div></div>
)
}
}

View File

@@ -1 +1 @@
export { default } from './search_popout';
export { default } from './search_popout'

View File

@@ -1 +1 @@
export { default } from './setting_toggle';
export { default } from './setting_toggle'

View File

@@ -1 +1 @@
export { default } from './status';
export { default } from './status'

View File

@@ -321,9 +321,9 @@ class Status extends ImmutablePureComponent {
prepend = (
<div className={[_s.default, _s.flexRow, _s.alignItemsCenter, _s.borderBottom1PX, _s.borderColorSecondary, _s.paddingVertical5PX, _s.paddingHorizontal15PX].join(' ')}>
<Icon
id='thumb-tack'
width='12px'
height='12px'
id='pin'
width='10px'
height='10px'
className={_s.fillcolorSecondary}
/>
<Text size='small' color='secondary' className={_s.marginLeft5PX}>

View File

@@ -1 +1 @@
export { default } from './status_action_bar';
export { default } from './status_action_bar'

View File

@@ -1 +1 @@
export { default } from './status_check_box';
export { default } from './status_check_box'

View File

@@ -1 +1 @@
export { default } from './status_content';
export { default } from './status_content'

View File

@@ -1 +1 @@
export { default } from './status_list';
export { default } from './status_list'

View File

@@ -98,7 +98,7 @@ export default class StatusList extends ImmutablePureComponent {
const { statusIds, featuredStatusIds, onLoadMore, timelineId, totalQueuedItemsCount, isLoading, isPartial, withGroupAdmin, group, promotion, promotedStatus, ...other } = this.props;
if (isPartial) {
return ( <ColumnIndicator type='loading' /> );
return <ColumnIndicator type='loading' />
}
let scrollableContent = (isLoading || statusIds.size > 0) ? (
@@ -110,7 +110,7 @@ export default class StatusList extends ImmutablePureComponent {
onClick={onLoadMore}
/>
) : (
<React.Fragment key={statusId}>
<Fragment key={statusId}>
<StatusContainer
id={statusId}
onMoveUp={this.handleMoveUp}
@@ -120,15 +120,16 @@ export default class StatusList extends ImmutablePureComponent {
withGroupAdmin={withGroupAdmin}
showThread
/>
{promotedStatus && index === promotion.position && (
{
promotedStatus && index === promotion.position &&
<StatusContainer
id={promotion.status_id}
contextType={timelineId}
promoted
showThread
/>
)}
</React.Fragment>
}
</Fragment>
))
) : null;

View File

@@ -66,9 +66,6 @@ class TabBarItem extends PureComponent {
size: !!large ? 'normal' : 'small',
color: isCurrent ? 'brand' : large ? 'secondary' : 'primary',
weight: isCurrent ? 'bold' : large ? 'medium' : 'normal',
className: cx({
paddingHorizontal5PX: large,
}),
}
return (

View File

@@ -4,7 +4,6 @@ import { injectIntl, defineMessages } from 'react-intl'
import { me } from '../initial_state'
import ComposeFormContainer from '../features/compose/containers/compose_form_container'
import Block from './block'
import Avatar from './avatar'
import Heading from './heading'
const messages = defineMessages({

View File

@@ -1,6 +1,8 @@
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import { shortNumberFormat } from '../utils/numbers';
import { FormattedMessage } from 'react-intl'
import classNames from 'classnames'
import { shortNumberFormat } from '../utils/numbers'
import Button from './button'
import Text from './text'
export default class TimelineQueueButtonHeader extends PureComponent {
@@ -8,21 +10,24 @@ export default class TimelineQueueButtonHeader extends PureComponent {
onClick: PropTypes.func.isRequired,
count: PropTypes.number,
itemType: PropTypes.string,
};
floating: PropTypes.bool
}
static defaultProps = {
count: 0,
itemType: 'item',
};
}
render () {
const { count, itemType, onClick } = this.props;
const { count, itemType, onClick } = this.props
const hasItems = (count > 0);
const hasItems = count > 0
// : todo :
const classes = classNames('timeline-queue-header', {
'timeline-queue-header--extended': hasItems,
});
})
return (
<div className={classes}>
@@ -40,7 +45,7 @@ export default class TimelineQueueButtonHeader extends PureComponent {
}
</a>
</div>
);
)
}
}

View File

@@ -1 +1 @@
export { default } from './toggle_switch';
export { default } from './toggle_switch'

View File

@@ -16,7 +16,7 @@ export default class TrendingItem extends ImmutablePureComponent {
static propTypes = {
trend: ImmutablePropTypes.map.isRequired,
};
}
state = {
hovering: false,

View File

@@ -14,7 +14,7 @@ export default class TrendingItemCard extends ImmutablePureComponent {
static propTypes = {
trend: ImmutablePropTypes.map.isRequired,
};
}
state = {
hovering: false,

View File

@@ -1 +1 @@
export { default } from './zoomable_image';
export { default } from './zoomable_image'