diff --git a/src/component/channelSelector/view.js b/src/component/channelSelector/view.js
index 6dc7940..09d2bc8 100644
--- a/src/component/channelSelector/view.js
+++ b/src/component/channelSelector/view.js
@@ -37,7 +37,7 @@ export default class ChannelSelector extends React.PureComponent {
};
handlePickerValueChange = (itemValue, itemIndex) => {
- if (Constants.ITEM_CREATE_A_CHANNEL === itemValue) {
+ if (Constants.ITEM_CREATE_A_CHANNEL === itemValue.name) {
this.setState({ showCreateChannel: true });
} else {
this.handleCreateCancel();
diff --git a/src/page/publish/view.js b/src/page/publish/view.js
index 3e820cd..53851b7 100644
--- a/src/page/publish/view.js
+++ b/src/page/publish/view.js
@@ -109,6 +109,8 @@ class PublishPage extends React.PureComponent {
title: null,
language: 'en',
license: LICENSES.NONE,
+ licenseUrl: '',
+ otherLicenseDescription: '',
mature: false,
name: null,
price: 0,
@@ -191,6 +193,8 @@ class PublishPage extends React.PureComponent {
description,
language,
license,
+ licenseUrl,
+ otherLicenseDescription,
mature,
name,
price,
@@ -219,17 +223,18 @@ class PublishPage extends React.PureComponent {
description: description || '',
language,
license,
- licenseUrl: '',
- otherLicenseDescription: '',
+ licenseUrl,
+ otherLicenseDescription,
name: name || undefined,
contentIsFree: !priceSet,
- fee: { currency: 'LBC', price },
+ fee: { currency: 'LBC', amount: price },
uri: uri || undefined,
channel: CLAIM_VALUES.CHANNEL_ANONYMOUS === channelName ? null : channelName,
isStillEditing: false,
claim: {
value: {
tags,
+ release_time: Math.round(Date.now() / 1000), // set now as the release time
},
},
};
@@ -310,6 +315,8 @@ class PublishPage extends React.PureComponent {
title: null,
language: 'en',
license: LICENSES.NONE,
+ licenseUrl: '',
+ otherLicenseDescription: '',
name: null,
price: 0,
uri: null,
@@ -541,6 +548,34 @@ class PublishPage extends React.PureComponent {
this.setState({ description });
};
+ handleLanguageValueChange = language => {
+ this.setState({ language });
+ };
+
+ handleLicenseValueChange = license => {
+ const otherLicenseDescription = [LICENSES.COPYRIGHT, LICENSES.OTHER].includes(license)
+ ? this.state.otherLicenseDescription
+ : '';
+
+ this.setState({
+ otherLicenseDescription,
+ license,
+ licenseUrl: LICENSES.CC_LICENSES.reduce((value, item) => {
+ if (typeof value === 'object') {
+ value = '';
+ }
+ if (license === item.value) {
+ value = item.url;
+ }
+ return value;
+ }),
+ });
+ };
+
+ handleChangeLicenseDescription = otherLicenseDescription => {
+ this.setState({ otherLicenseDescription });
+ };
+
render() {
const { balance, navigation, notify, publishFormValues } = this.props;
const { canUseCamera, currentPhase, galleryThumbnailsChecked, thumbnailPath, videos } = this.state;
@@ -779,6 +814,16 @@ class PublishPage extends React.PureComponent {
+ {[LICENSES.COPYRIGHT, LICENSES.OTHER].includes(this.state.license) && (
+
+ )}
)}