Progress
This commit is contained in:
@@ -270,7 +270,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
{
|
||||
shouldCondense &&
|
||||
<div className={[_s.default, _s.mr10, _s.mt5].join(' ')}>
|
||||
<Avatar account={account} size='28' />
|
||||
<Avatar account={account} size={28} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ const messages = defineMessages({
|
||||
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['popover', 'popoverType']) === 'EMOJI_PICKER',
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick(targetRef) {
|
||||
dispatch(openPopover('EMOJI_PICKER', {
|
||||
|
||||
@@ -10,7 +10,7 @@ const messages = defineMessages({
|
||||
})
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']),
|
||||
disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 3 || state.getIn(['compose', 'media_attachments']).some(m => m.get('type') === 'video')),
|
||||
unavailable: state.getIn(['compose', 'poll']) !== null,
|
||||
@@ -20,10 +20,8 @@ const makeMapStateToProps = () => {
|
||||
return mapStateToProps
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
onSelectFile(files) {
|
||||
dispatch(uploadCompose(files))
|
||||
},
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onSelectFile: (files) => dispatch(uploadCompose(files)),
|
||||
})
|
||||
|
||||
export default
|
||||
|
||||
@@ -22,7 +22,7 @@ const mapStateToProps = (state, { id, otherProps }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onUndo: id => {
|
||||
dispatch(undoUploadCompose(id));
|
||||
|
||||
@@ -5,11 +5,9 @@ import Avatar from '../../../../components/avatar';
|
||||
import Button from '../../../../components/button'
|
||||
import { me } from '../../../../initial_state';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
account: state.getIn(['accounts', me]),
|
||||
};
|
||||
};
|
||||
const mapStateToProps = (state) => ({
|
||||
account: state.getIn(['accounts', me]),
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(mapStateToProps)
|
||||
|
||||
@@ -8,12 +8,12 @@ const messages = defineMessages({
|
||||
remove_poll: { id: 'poll_button.remove_poll', defaultMessage: 'Remove poll' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
unavailable: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 0),
|
||||
active: state.getIn(['compose', 'poll']) !== null,
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick() {
|
||||
dispatch((_, getState) => {
|
||||
|
||||
@@ -12,7 +12,7 @@ const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['compose', 'rte_controls_visible']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick (status) {
|
||||
dispatch(changeRichTextEditorControlsVisibility(status))
|
||||
|
||||
@@ -10,11 +10,11 @@ const messages = defineMessages({
|
||||
schedule_status: { id: 'schedule_status.title', defaultMessage: 'Schedule' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
isPro: state.getIn(['accounts', me, 'is_pro']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onOpenDatePickerPopover(targetRef) {
|
||||
dispatch(openPopover('DATE_PICKER', {
|
||||
targetRef,
|
||||
|
||||
@@ -10,8 +10,7 @@ import Block from '../../../../components/block'
|
||||
import Heading from '../../../../components/heading'
|
||||
import Button from '../../../../components/button'
|
||||
import Text from '../../../../components/text'
|
||||
|
||||
import AccountContainer from '../../../../containers/account_container'
|
||||
import Account from '../../../../components/account'
|
||||
|
||||
export default class SearchResults extends ImmutablePureComponent {
|
||||
|
||||
@@ -65,7 +64,7 @@ export default class SearchResults extends ImmutablePureComponent {
|
||||
</div>
|
||||
|
||||
{
|
||||
results.get('accounts').slice(0, size).map(accountId => <AccountContainer expanded key={accountId} id={accountId} />)
|
||||
results.get('accounts').slice(0, size).map(accountId => <Account expanded key={accountId} id={accountId} />)
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6,12 +6,12 @@ const messages = defineMessages({
|
||||
markAsSensitive: { id: 'compose_form.sensitive.hide', defaultMessage: 'Mark media as sensitive' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['compose', 'sensitive']),
|
||||
disabled: state.getIn(['compose', 'spoiler']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick () {
|
||||
dispatch(changeComposeSensitivity())
|
||||
|
||||
@@ -12,7 +12,7 @@ const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['compose', 'spoiler']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick () {
|
||||
dispatch(changeComposeSpoilerness())
|
||||
|
||||
@@ -4,7 +4,7 @@ import ProgressBar from '../../../../components/progress_bar'
|
||||
import Upload from '../media_upload_item'
|
||||
import SensitiveMediaButton from '../sensitive_media_button'
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
mediaIds: state.getIn(['compose', 'media_attachments']).map(item => item.get('id')),
|
||||
isUploading: state.getIn(['compose', 'is_uploading']),
|
||||
uploadProgress: state.getIn(['compose', 'progress']),
|
||||
|
||||
Reference in New Issue
Block a user