diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 51c11e5a..13cab8b5 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -123,6 +123,10 @@ export function submitComposeFail(error) { export function uploadCompose(files) { return function (dispatch, getState) { + if (getState().getIn(['compose', 'media_attachments']).size > 3) { + return; + } + dispatch(uploadComposeRequest()); let data = new FormData(); @@ -231,17 +235,15 @@ export function unmountCompose() { }; }; -export function changeComposeSensitivity(checked) { +export function changeComposeSensitivity() { return { type: COMPOSE_SENSITIVITY_CHANGE, - checked }; }; -export function changeComposeSpoilerness(checked) { +export function changeComposeSpoilerness() { return { - type: COMPOSE_SPOILERNESS_CHANGE, - checked + type: COMPOSE_SPOILERNESS_CHANGE }; }; @@ -252,17 +254,10 @@ export function changeComposeSpoilerText(text) { }; }; -export function changeComposeVisibility(checked) { +export function changeComposeVisibility(value) { return { type: COMPOSE_VISIBILITY_CHANGE, - checked - }; -}; - -export function changeComposeListability(checked) { - return { - type: COMPOSE_LISTABILITY_CHANGE, - checked + value }; }; diff --git a/app/assets/javascripts/components/components/icon_button.jsx b/app/assets/javascripts/components/components/icon_button.jsx index f9b6192c..a08b1159 100644 --- a/app/assets/javascripts/components/components/icon_button.jsx +++ b/app/assets/javascripts/components/components/icon_button.jsx @@ -12,6 +12,7 @@ const IconButton = React.createClass({ style: React.PropTypes.object, activeStyle: React.PropTypes.object, disabled: React.PropTypes.bool, + inverted: React.PropTypes.bool, animate: React.PropTypes.bool }, @@ -36,10 +37,6 @@ const IconButton = React.createClass({ render () { let style = { - display: 'inline-block', - border: 'none', - padding: '0', - background: 'transparent', fontSize: `${this.props.size}px`, width: `${this.props.size * 1.28571429}px`, height: `${this.props.size}px`, @@ -57,7 +54,7 @@ const IconButton = React.createClass({