mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-15 20:54:01 -05:00
23f7afa562
Move media description input to a modal and unite that modal with the focal point modal. Add a hint about choosing focal points, as well as a preview of a 16:9 thumbnail. Enable the user to watch the video next to the media description input. Fix #8320 Fix #6713
28 lines
723 B
JavaScript
28 lines
723 B
JavaScript
import { connect } from 'react-redux';
|
|
import Upload from '../components/upload';
|
|
import { undoUploadCompose } from '../../../actions/compose';
|
|
import { openModal } from '../../../actions/modal';
|
|
import { submitCompose } from '../../../actions/compose';
|
|
|
|
const mapStateToProps = (state, { id }) => ({
|
|
media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onUndo: id => {
|
|
dispatch(undoUploadCompose(id));
|
|
},
|
|
|
|
onOpenFocalPoint: id => {
|
|
dispatch(openModal('FOCAL_POINT', { id }));
|
|
},
|
|
|
|
onSubmit (router) {
|
|
dispatch(submitCompose(router));
|
|
},
|
|
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Upload);
|