2019-06-28 09:27:55 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-12-09 19:51:00 +01:00
|
|
|
import {
|
|
|
|
selectBalance,
|
|
|
|
selectIsStillEditing,
|
|
|
|
makeSelectPublishFormValue,
|
|
|
|
doUpdatePublishForm,
|
|
|
|
doToast,
|
2019-12-26 16:37:26 +01:00
|
|
|
doClearPublish,
|
2019-12-09 19:51:00 +01:00
|
|
|
} from 'lbry-redux';
|
2020-03-24 18:57:17 +01:00
|
|
|
import { selectFfmpegStatus } from 'redux/selectors/settings';
|
2019-06-28 09:27:55 +02:00
|
|
|
import PublishPage from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
name: makeSelectPublishFormValue('name')(state),
|
|
|
|
filePath: makeSelectPublishFormValue('filePath')(state),
|
2020-03-24 18:57:17 +01:00
|
|
|
optimize: makeSelectPublishFormValue('optimize')(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
isStillEditing: selectIsStillEditing(state),
|
|
|
|
balance: selectBalance(state),
|
2019-10-11 02:37:18 +02:00
|
|
|
publishing: makeSelectPublishFormValue('publishing')(state),
|
2020-03-24 18:57:17 +01:00
|
|
|
ffmpegStatus: selectFfmpegStatus(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2019-12-26 16:37:26 +01:00
|
|
|
clearPublish: () => dispatch(doClearPublish()),
|
2019-06-28 09:27:55 +02:00
|
|
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
2019-12-09 19:51:00 +01:00
|
|
|
showToast: message => dispatch(doToast({ message, isError: true })),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(PublishPage);
|