|
|
@ -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) {
|
|
|
@ -247,7 +241,6 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
icons,
|
|
|
|
icons,
|
|
|
|
screenshots,
|
|
|
|
screenshots,
|
|
|
|
binaryFiles,
|
|
|
|
binaryFiles,
|
|
|
|
isFree,
|
|
|
|
|
|
|
|
previewImage,
|
|
|
|
previewImage,
|
|
|
|
previewVisible,
|
|
|
|
previewVisible,
|
|
|
|
binaryFileHelperText,
|
|
|
|
binaryFileHelperText,
|
|
|
@ -310,6 +303,7 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: 'Please select a icon'
|
|
|
|
message: 'Please select a icon'
|
|
|
|
})(
|
|
|
|
})(
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<Upload
|
|
|
|
<Upload
|
|
|
|
name="logo"
|
|
|
|
name="logo"
|
|
|
|
listType="picture-card"
|
|
|
|
listType="picture-card"
|
|
|
@ -317,10 +311,11 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
beforeUpload={() => false}
|
|
|
|
beforeUpload={() => false}
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
{icons.length === 1 ? null : uploadButton}
|
|
|
|
{icons.length === 1 ? null : uploadButton}
|
|
|
|
</Upload>,
|
|
|
|
</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,6 +326,7 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: 'Please select a icon'
|
|
|
|
message: 'Please select a icon'
|
|
|
|
})(
|
|
|
|
})(
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<Upload
|
|
|
|
<Upload
|
|
|
|
name="screenshots"
|
|
|
|
name="screenshots"
|
|
|
|
listType="picture-card"
|
|
|
|
listType="picture-card"
|
|
|
@ -338,7 +334,9 @@ class NewAppUploadForm extends React.Component {
|
|
|
|
beforeUpload={() => false}
|
|
|
|
beforeUpload={() => false}
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
onPreview={this.handlePreview}>
|
|
|
|
{screenshots.length >= 3 ? null : uploadButton}
|
|
|
|
{screenshots.length >= 3 ? null : uploadButton}
|
|
|
|
</Upload>,
|
|
|
|
</Upload>
|
|
|
|
|
|
|
|
<Text>Required 3 screenshots, Recommended min. 320px max. 3840px</Text>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|