Aria-labels actually didn't work in React, so removing. Fixing some bugs
This commit is contained in:
parent
159203a7bc
commit
0405ef977a
|
@ -55,6 +55,7 @@ export function submitCompose() {
|
||||||
media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id'))
|
media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id'))
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
dispatch(submitComposeSuccess(response.data));
|
dispatch(submitComposeSuccess(response.data));
|
||||||
|
dispatch(updateTimeline('home', response.data));
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
dispatch(submitComposeFail(error));
|
dispatch(submitComposeFail(error));
|
||||||
});
|
});
|
||||||
|
@ -68,13 +69,9 @@ export function submitComposeRequest() {
|
||||||
};
|
};
|
||||||
|
|
||||||
export function submitComposeSuccess(status) {
|
export function submitComposeSuccess(status) {
|
||||||
return (dispatch, getState) => {
|
return {
|
||||||
dispatch({
|
type: COMPOSE_SUBMIT_SUCCESS,
|
||||||
type: COMPOSE_SUBMIT_SUCCESS,
|
status: status
|
||||||
status: status
|
|
||||||
});
|
|
||||||
|
|
||||||
dispatch(updateTimeline('home', status));
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,6 @@ const ComposeForm = React.createClass({
|
||||||
|
|
||||||
const inputProps = {
|
const inputProps = {
|
||||||
placeholder: 'What is on your mind?',
|
placeholder: 'What is on your mind?',
|
||||||
arialabel: 'What is on your mind?',
|
|
||||||
value: this.props.text,
|
value: this.props.text,
|
||||||
onKeyUp: this.handleKeyUp,
|
onKeyUp: this.handleKeyUp,
|
||||||
onChange: this.handleChange,
|
onChange: this.handleChange,
|
||||||
|
|
|
@ -33,7 +33,7 @@ const FollowForm = React.createClass({
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div style={{ display: 'flex', lineHeight: '20px', padding: '10px', background: '#373b4a' }}>
|
<div style={{ display: 'flex', lineHeight: '20px', padding: '10px', background: '#373b4a' }}>
|
||||||
<input autoComplete='off' type='text' disabled={this.props.is_submitting} placeholder='username@domain' ariaLabel='Search for username@domain to follow this user' value={this.props.text} onKeyUp={this.handleKeyUp} onChange={this.handleChange} className='follow-form__input' style={{ flex: '1 1 auto', boxSizing: 'border-box', display: 'block', border: 'none', padding: '10px', fontFamily: 'Roboto', color: '#282c37', fontSize: '14px', margin: '0' }} />
|
<input autoComplete='off' type='text' disabled={this.props.is_submitting} placeholder='username@domain' value={this.props.text} onKeyUp={this.handleKeyUp} onChange={this.handleChange} className='follow-form__input' style={{ flex: '1 1 auto', boxSizing: 'border-box', display: 'block', border: 'none', padding: '10px', fontFamily: 'Roboto', color: '#282c37', fontSize: '14px', margin: '0' }} />
|
||||||
<div style={{ padding: '10px', paddingRight: '0' }}><IconButton title='Follow' size={20} icon='user-plus' onClick={this.handleSubmit} disabled={this.props.is_submitting} /></div>
|
<div style={{ padding: '10px', paddingRight: '0' }}><IconButton title='Follow' size={20} icon='user-plus' onClick={this.handleSubmit} disabled={this.props.is_submitting} /></div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -71,11 +71,12 @@ export default function accounts(state = initialState, action) {
|
||||||
case ACCOUNT_TIMELINE_EXPAND_SUCCESS:
|
case ACCOUNT_TIMELINE_EXPAND_SUCCESS:
|
||||||
case CONTEXT_FETCH_SUCCESS:
|
case CONTEXT_FETCH_SUCCESS:
|
||||||
return normalizeAccountsFromStatuses(state, action.statuses);
|
return normalizeAccountsFromStatuses(state, action.statuses);
|
||||||
case TIMELINE_UPDATE:
|
|
||||||
case REBLOG_SUCCESS:
|
case REBLOG_SUCCESS:
|
||||||
case FAVOURITE_SUCCESS:
|
case FAVOURITE_SUCCESS:
|
||||||
case UNREBLOG_SUCCESS:
|
case UNREBLOG_SUCCESS:
|
||||||
case UNFAVOURITE_SUCCESS:
|
case UNFAVOURITE_SUCCESS:
|
||||||
|
return normalizeAccountFromStatus(state, action.response);
|
||||||
|
case TIMELINE_UPDATE:
|
||||||
case STATUS_FETCH_SUCCESS:
|
case STATUS_FETCH_SUCCESS:
|
||||||
return normalizeAccountFromStatus(state, action.status);
|
return normalizeAccountFromStatus(state, action.status);
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue