This commit is contained in:
mgabdev
2020-03-08 12:46:00 -04:00
parent 557c6470f5
commit 2f9dbfa91d
16 changed files with 189 additions and 277 deletions

View File

@@ -349,7 +349,7 @@ class ComposeForm extends ImmutablePureComponent {
}
<SpoilerButton small={shouldCondense} />
<SchedulePostDropdown small={shouldCondense} position={isModalOpen ? 'top' : undefined} />
<EmojiPickerButton />
<EmojiPickerButton small={shouldCondense} />
</div>
<CharacterCounter max={maxPostCharacterCount} text={text} small={shouldCondense} />
{

View File

@@ -100,19 +100,22 @@ class PollFormOption extends ImmutablePureComponent {
/>
</label>
<Button
narrow
circle
backgroundColor='none'
className={[_s.marginLeft5PX, _s.justifyContentCenter].join(' ')}
icon='close'
iconWidth='8px'
iconHeight='8px'
iconClassName={_s.fillColorSecondary}
disabled={index <= 1}
title={intl.formatMessage(messages.remove_option)}
onClick={this.handleOptionRemove}
/>
{
index > 1 &&
<Button
narrow
circle
backgroundColor='none'
className={[_s.marginLeft5PX, _s.justifyContentCenter].join(' ')}
icon='close'
iconWidth='8px'
iconHeight='8px'
iconClassName={_s.fillColorSecondary}
disabled={index <= 1}
title={intl.formatMessage(messages.remove_option)}
onClick={this.handleOptionRemove}
/>
}
</li>
);
}

View File

@@ -1,40 +1,41 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import TrendingItem from '../../../../components/trends_panel_item';
import Icon from '../../../../components/icon';
import { WhoToFollowPanel } from '../../../../components/panel';
// import TrendsPanel from '../../ui/components/trends_panel';
import GroupListItem from '../../../../components/group_list_item';
import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import { FormattedMessage } from 'react-intl'
import TrendingItem from '../../../../components/trends_panel_item'
import Icon from '../../../../components/icon'
import { WhoToFollowPanel } from '../../../../components/panel'
// import TrendsPanel from '../../ui/components/trends_panel'
import GroupListItem from '../../../../components/group_list_item'
import Block from '../../../../components/block'
export default class SearchResults extends ImmutablePureComponent {
static propTypes = {
results: ImmutablePropTypes.map.isRequired,
location: PropTypes.object,
};
}
state = {
isSmallScreen: (window.innerWidth <= 895),
}
render () {
const { results, location } = this.props;
const { isSmallScreen } = this.state;
const { results, location } = this.props
const { isSmallScreen } = this.state
if (results.isEmpty() && isSmallScreen) {
return (
<div className='search-results'>
<WhoToFollowPanel />
</div>
);
)
}
const pathname = location.pathname || '';
const showPeople = pathname === '/search/people';
const showHashtags = pathname === '/search/hashtags';
const showGroups = pathname === '/search/groups';
const isTop = !showPeople && !showHashtags && !showGroups;
const pathname = location.pathname || ''
const showPeople = pathname === '/search/people'
const showHashtags = pathname === '/search/hashtags'
const showGroups = pathname === '/search/groups'
const isTop = !showPeople && !showHashtags && !showGroups
let accounts, statuses, hashtags, groups;
let count = 0;
@@ -73,7 +74,7 @@ export default class SearchResults extends ImmutablePureComponent {
}
return (
<div className='search-results'>
<Block>
<div className='search-results__header'>
<Icon id='search' fixedWidth />
<FormattedMessage
@@ -89,8 +90,8 @@ export default class SearchResults extends ImmutablePureComponent {
{groups}
{statuses}
{hashtags}
</div>
);
</Block>
)
}
}