|
|
@ -17,10 +17,10 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
import React from "react";
|
|
|
|
import {Button, Col, Form, Icon, Input, Row, Select, Switch, Upload, InputNumber, Modal, Alert} from "antd";
|
|
|
|
import {Button, Col, Form, Icon, Input, Row, Select, Switch, Upload, Typography, Modal, Alert} from "antd";
|
|
|
|
import "@babel/polyfill";
|
|
|
|
import "@babel/polyfill";
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
import {handleApiError} from "../../../js/Utils";
|
|
|
|
const {Text} = Typography;
|
|
|
|
|
|
|
|
|
|
|
|
const formItemLayout = {
|
|
|
|
const formItemLayout = {
|
|
|
|
labelCol: {
|
|
|
|
labelCol: {
|
|
|
@ -196,12 +196,6 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
handlePriceTypeChange = (value) => {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
isFree: (value === 'free')
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handlePreviewCancel = () => this.setState({previewVisible: false});
|
|
|
|
handlePreviewCancel = () => this.setState({previewVisible: false});
|
|
|
|
handlePreview = async file => {
|
|
|
|
handlePreview = async file => {
|
|
|
|
if (!file.url && !file.preview) {
|
|
|
|
if (!file.url && !file.preview) {
|
|
|
@ -231,7 +225,7 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
handleUpperOsVersionChange = (upperOsVersion) => {
|
|
|
|
handleUpperOsVersionChange = (upperOsVersion) => {
|
|
|
|
if (upperOsVersion === "all") {
|
|
|
|
if (upperOsVersion === "all") {
|
|
|
|
this.upperOsVersion = this.props.supportedOsVersions[this.props.supportedOsVersions.length - 1]["versionName"];
|
|
|
|
this.upperOsVersion = this.props.supportedOsVersions[this.props.supportedOsVersions.length - 1]["versionName"];
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
this.upperOsVersion = upperOsVersion;
|
|
|
|
this.upperOsVersion = upperOsVersion;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -247,7 +241,6 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
icons,
|
|
|
|
icons,
|
|
|
|
screenshots,
|
|
|
|
screenshots,
|
|
|
|
binaryFiles,
|
|
|
|
binaryFiles,
|
|
|
|
isFree,
|
|
|
|
|
|
|
|
previewImage,
|
|
|
|
previewImage,
|
|
|
|
previewVisible,
|
|
|
|
previewVisible,
|
|
|
|
binaryFileHelperText,
|
|
|
|
binaryFileHelperText,
|
|
|
@ -310,17 +303,19 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: 'Please select a icon'
|
|
|
|
message: 'Please select a icon'
|
|
|
|
})(
|
|
|
|
})(
|
|
|
|
<Upload
|
|
|
|
<div>
|
|
|
|
name="logo"
|
|
|
|
<Upload
|
|
|
|
listType="picture-card"
|
|
|
|
name="logo"
|
|
|
|
onChange={this.handleIconChange}
|
|
|
|
listType="picture-card"
|
|
|
|
beforeUpload={() => false}
|
|
|
|
onChange={this.handleIconChange}
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
beforeUpload={() => false}
|
|
|
|
{icons.length === 1 ? null : uploadButton}
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
</Upload>,
|
|
|
|
{icons.length === 1 ? null : uploadButton}
|
|
|
|
|
|
|
|
</Upload>
|
|
|
|
|
|
|
|
<Text>Recommended : 240px x 240px</Text>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Form.Item {...formItemLayout}
|
|
|
|
<Form.Item {...formItemLayout}
|
|
|
|
label="Screenshots"
|
|
|
|
label="Screenshots"
|
|
|
|
validateStatus="error"
|
|
|
|
validateStatus="error"
|
|
|
@ -331,14 +326,17 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: 'Please select a icon'
|
|
|
|
message: 'Please select a icon'
|
|
|
|
})(
|
|
|
|
})(
|
|
|
|
<Upload
|
|
|
|
<div>
|
|
|
|
name="screenshots"
|
|
|
|
<Upload
|
|
|
|
listType="picture-card"
|
|
|
|
name="screenshots"
|
|
|
|
onChange={this.handleScreenshotChange}
|
|
|
|
listType="picture-card"
|
|
|
|
beforeUpload={() => false}
|
|
|
|
onChange={this.handleScreenshotChange}
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
beforeUpload={() => false}
|
|
|
|
{screenshots.length >= 3 ? null : uploadButton}
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
</Upload>,
|
|
|
|
{screenshots.length >= 3 ? null : uploadButton}
|
|
|
|
|
|
|
|
</Upload>
|
|
|
|
|
|
|
|
<Text>Required 3 screenshots, Recommended min. 320px max. 3840px</Text>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|