diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-25 00:01:43 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-25 19:14:12 +0100 |
commit | d8c5a83827c24a8931da7f2b1fd78da66162bd7e (patch) | |
tree | 0c178387da08b6978a87d5191ff9651d6735e4b2 /app/assets/javascripts/components/actions | |
parent | 9bf4c34919c0ad09417394eaa246c8af9effe131 (diff) |
Redesigned compose form
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 51c11e5ad..13cab8b5b 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 }; }; |