@ -32,6 +32,7 @@ const ComposeForm = React.createClass({
is _uploading : React . PropTypes . bool ,
is _uploading : React . PropTypes . bool ,
in _reply _to : ImmutablePropTypes . map ,
in _reply _to : ImmutablePropTypes . map ,
media _count : React . PropTypes . number ,
media _count : React . PropTypes . number ,
me : React . PropTypes . number ,
onChange : React . PropTypes . func . isRequired ,
onChange : React . PropTypes . func . isRequired ,
onSubmit : React . PropTypes . func . isRequired ,
onSubmit : React . PropTypes . func . isRequired ,
onCancelReply : React . PropTypes . func . isRequired ,
onCancelReply : React . PropTypes . func . isRequired ,
@ -110,6 +111,8 @@ const ComposeForm = React.createClass({
replyArea = < ReplyIndicator status = { this . props . in _reply _to } onCancel = { this . props . onCancelReply } / > ;
replyArea = < ReplyIndicator status = { this . props . in _reply _to } onCancel = { this . props . onCancelReply } / > ;
}
}
let reply _to _other = ! ! this . props . in _reply _to && ( this . props . in _reply _to . getIn ( [ 'account' , 'id' ] ) !== this . props . me ) ;
return (
return (
< div style = { { padding : '10px' } } >
< div style = { { padding : '10px' } } >
{ replyArea }
{ replyArea }
@ -139,7 +142,7 @@ const ComposeForm = React.createClass({
< span style = { { display : 'inline-block' , verticalAlign : 'middle' , marginBottom : '14px' , marginLeft : '8px' , color : '#9baec8' } } > < FormattedMessage id = 'compose_form.private' defaultMessage = 'Mark as private' / > < / span >
< span style = { { display : 'inline-block' , verticalAlign : 'middle' , marginBottom : '14px' , marginLeft : '8px' , color : '#9baec8' } } > < FormattedMessage id = 'compose_form.private' defaultMessage = 'Mark as private' / > < / span >
< / label >
< / label >
< Motion defaultStyle = { { opacity : ( this . props . private || this . props . in _reply _to ) ? 0 : 100 , height : ( this . props . private || this . props . in _reply _to ) ? 39.5 : 0 } } style = { { opacity : spring ( ( this . props . private || this . props . in _reply _to ) ? 0 : 100 ) , height : spring ( ( this . props . private || this . props . in _reply _to ) ? 0 : 39.5 ) } } >
< Motion defaultStyle = { { opacity : ( this . props . private || reply _to _other ) ? 0 : 100 , height : ( this . props . private || reply _to _other ) ? 39.5 : 0 } } style = { { opacity : spring ( ( this . props . private || reply _to _other ) ? 0 : 100 ) , height : spring ( ( this . props . private || reply _to _other ) ? 0 : 39.5 ) } } >
{ ( { opacity , height } ) =>
{ ( { opacity , height } ) =>
< label style = { { display : 'block' , lineHeight : '24px' , verticalAlign : 'middle' , height : ` ${ height } px ` , overflow : 'hidden' , opacity : opacity / 100 } } >
< label style = { { display : 'block' , lineHeight : '24px' , verticalAlign : 'middle' , height : ` ${ height } px ` , overflow : 'hidden' , opacity : opacity / 100 } } >
< Toggle checked = { this . props . unlisted } onChange = { this . handleChangeListability } / >
< Toggle checked = { this . props . unlisted } onChange = { this . handleChangeListability } / >