diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-13 19:08:52 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-13 19:08:52 +0100 |
commit | 50d3083cbddf410e9024fb59559c46e9390a5662 (patch) | |
tree | 07cbb12ff6f018635a041ecd7f640995491af622 /app/assets/javascripts/components/features/ui/containers | |
parent | d42ed78aa432e448346f2b9585ee983e08631ba0 (diff) |
Making upload button into a smaller icon button
Diffstat (limited to 'app/assets/javascripts/components/features/ui/containers')
4 files changed, 0 insertions, 115 deletions
diff --git a/app/assets/javascripts/components/features/ui/containers/compose_form_container.jsx b/app/assets/javascripts/components/features/ui/containers/compose_form_container.jsx deleted file mode 100644 index 87bcd6b99..000000000 --- a/app/assets/javascripts/components/features/ui/containers/compose_form_container.jsx +++ /dev/null @@ -1,58 +0,0 @@ -import { connect } from 'react-redux'; -import ComposeForm from '../components/compose_form'; -import { - changeCompose, - submitCompose, - cancelReplyCompose, - clearComposeSuggestions, - fetchComposeSuggestions, - selectComposeSuggestion -} from '../../../actions/compose'; -import { makeGetStatus } from '../../../selectors'; - -const makeMapStateToProps = () => { - const getStatus = makeGetStatus(); - - const mapStateToProps = function (state, props) { - return { - text: state.getIn(['compose', 'text']), - suggestion_token: state.getIn(['compose', 'suggestion_token']), - suggestions: state.getIn(['compose', 'suggestions']).toJS(), - is_submitting: state.getIn(['compose', 'is_submitting']), - is_uploading: state.getIn(['compose', 'is_uploading']), - in_reply_to: getStatus(state, state.getIn(['compose', 'in_reply_to'])) - }; - }; - - return mapStateToProps; -}; - -const mapDispatchToProps = function (dispatch) { - return { - onChange (text) { - dispatch(changeCompose(text)); - }, - - onSubmit () { - dispatch(submitCompose()); - }, - - onCancelReply () { - dispatch(cancelReplyCompose()); - }, - - onClearSuggestions () { - dispatch(clearComposeSuggestions()); - }, - - onFetchSuggestions (token) { - dispatch(fetchComposeSuggestions(token)); - }, - - onSuggestionSelected (position, accountId) { - dispatch(selectComposeSuggestion(position, accountId)); - } - } -}; - -export default connect(makeMapStateToProps, mapDispatchToProps)(ComposeForm); diff --git a/app/assets/javascripts/components/features/ui/containers/follow_form_container.jsx b/app/assets/javascripts/components/features/ui/containers/follow_form_container.jsx deleted file mode 100644 index 05cfb7c1d..000000000 --- a/app/assets/javascripts/components/features/ui/containers/follow_form_container.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import { connect } from 'react-redux'; -import FollowForm from '../components/follow_form'; -import { changeFollow, submitFollow } from '../../../actions/follow'; - -const mapStateToProps = function (state, props) { - return { - text: state.getIn(['follow', 'text']), - is_submitting: state.getIn(['follow', 'is_submitting']) - }; -}; - -const mapDispatchToProps = function (dispatch) { - return { - onChange: function (text) { - dispatch(changeFollow(text)); - }, - - onSubmit: function (router) { - dispatch(submitFollow(router)); - } - } -}; - -export default connect(mapStateToProps, mapDispatchToProps)(FollowForm); diff --git a/app/assets/javascripts/components/features/ui/containers/navigation_container.jsx b/app/assets/javascripts/components/features/ui/containers/navigation_container.jsx deleted file mode 100644 index 51e2513d8..000000000 --- a/app/assets/javascripts/components/features/ui/containers/navigation_container.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import { connect } from 'react-redux'; -import NavigationBar from '../components/navigation_bar'; - -const mapStateToProps = (state, props) => ({ - account: state.getIn(['accounts', state.getIn(['meta', 'me'])]) -}); - -export default connect(mapStateToProps)(NavigationBar); diff --git a/app/assets/javascripts/components/features/ui/containers/upload_form_container.jsx b/app/assets/javascripts/components/features/ui/containers/upload_form_container.jsx deleted file mode 100644 index 6554f944f..000000000 --- a/app/assets/javascripts/components/features/ui/containers/upload_form_container.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { connect } from 'react-redux'; -import UploadForm from '../components/upload_form'; -import { uploadCompose, undoUploadCompose } from '../../../actions/compose'; - -const mapStateToProps = function (state, props) { - return { - media: state.getIn(['compose', 'media_attachments']), - progress: state.getIn(['compose', 'progress']), - is_uploading: state.getIn(['compose', 'is_uploading']) - }; -}; - -const mapDispatchToProps = function (dispatch) { - return { - onSelectFile: function (files) { - dispatch(uploadCompose(files)); - }, - - onRemoveFile: function (media_id) { - dispatch(undoUploadCompose(media_id)); - } - } -}; - -export default connect(mapStateToProps, mapDispatchToProps)(UploadForm); |