|
|
@ -32,13 +32,11 @@ import {
|
|
|
|
Icon,
|
|
|
|
Icon,
|
|
|
|
Card
|
|
|
|
Card
|
|
|
|
} from 'antd';
|
|
|
|
} from 'antd';
|
|
|
|
|
|
|
|
|
|
|
|
import "../../../../App.css";
|
|
|
|
|
|
|
|
import DetailedRating from "../../detailed-rating/DetailedRating";
|
|
|
|
import DetailedRating from "../../detailed-rating/DetailedRating";
|
|
|
|
import {Link} from "react-router-dom";
|
|
|
|
import {Link} from "react-router-dom";
|
|
|
|
import axios from "axios";
|
|
|
|
import axios from "axios";
|
|
|
|
import ReactQuill from "react-quill";
|
|
|
|
import ReactQuill from "react-quill";
|
|
|
|
import ReactHtmlParser, {processNodes, convertNodeToElement, htmlparser2} from 'react-html-parser';
|
|
|
|
import ReactHtmlParser from 'react-html-parser';
|
|
|
|
import "./AppDetailsDrawer.css";
|
|
|
|
import "./AppDetailsDrawer.css";
|
|
|
|
import pSBC from "shade-blend-color";
|
|
|
|
import pSBC from "shade-blend-color";
|
|
|
|
import {withConfigContext} from "../../../../context/ConfigContext";
|
|
|
|
import {withConfigContext} from "../../../../context/ConfigContext";
|
|
|
@ -71,6 +69,8 @@ const formats = [
|
|
|
|
class AppDetailsDrawer extends React.Component {
|
|
|
|
class AppDetailsDrawer extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
const drawerWidth = window.innerWidth<=768 ? '80%' : '40%';
|
|
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
name: "",
|
|
|
|
name: "",
|
|
|
@ -85,6 +85,8 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
isDescriptionEditEnabled: false,
|
|
|
|
isDescriptionEditEnabled: false,
|
|
|
|
isCategoriesEditEnabled: false,
|
|
|
|
isCategoriesEditEnabled: false,
|
|
|
|
isTagsEditEnabled: false,
|
|
|
|
isTagsEditEnabled: false,
|
|
|
|
|
|
|
|
drawer: null,
|
|
|
|
|
|
|
|
drawerWidth
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -188,7 +190,6 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// change the app name
|
|
|
|
// change the app name
|
|
|
|
handleNameSave = name => {
|
|
|
|
handleNameSave = name => {
|
|
|
|
const config = this.props.context;
|
|
|
|
const config = this.props.context;
|
|
|
@ -412,7 +413,6 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const config = this.props.context;
|
|
|
|
const config = this.props.context;
|
|
|
|
const {app, visible, onClose} = this.props;
|
|
|
|
const {app, visible, onClose} = this.props;
|
|
|
@ -458,11 +458,12 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Drawer
|
|
|
|
<Drawer
|
|
|
|
placement="right"
|
|
|
|
placement="right"
|
|
|
|
width={640}
|
|
|
|
width={this.state.drawerWidth}
|
|
|
|
closable={false}
|
|
|
|
closable={false}
|
|
|
|
onClose={onClose}
|
|
|
|
onClose={onClose}
|
|
|
|
visible={visible}
|
|
|
|
visible={visible}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
<Spin spinning={loading} delay={500}>
|
|
|
|
<Spin spinning={loading} delay={500}>
|
|
|
|
<div style={{textAlign: "center"}}>
|
|
|
|
<div style={{textAlign: "center"}}>
|
|
|
|
{avatar}
|
|
|
|
{avatar}
|
|
|
@ -473,8 +474,12 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
{/*display add new release only if app type is enterprise*/}
|
|
|
|
{/*display add new release only if app type is enterprise*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="releases-details">
|
|
|
|
|
|
|
|
|
|
|
|
{(app.type === "ENTERPRISE") && (
|
|
|
|
{(app.type === "ENTERPRISE") && (
|
|
|
|
<Link to={`/publisher/apps/${app.id}/add-release`}><Button htmlType="button" size="small">Add
|
|
|
|
<Link to={`/publisher/apps/${app.id}/add-release`}><Button htmlType="button"
|
|
|
|
|
|
|
|
size="small">Add
|
|
|
|
new release</Button></Link>)}
|
|
|
|
new release</Button></Link>)}
|
|
|
|
<List
|
|
|
|
<List
|
|
|
|
style={{paddingTop: 16}}
|
|
|
|
style={{paddingTop: 16}}
|
|
|
@ -492,7 +497,7 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
description={
|
|
|
|
description={
|
|
|
|
<div style={{
|
|
|
|
<div style={{
|
|
|
|
fontSize: "0.7em"
|
|
|
|
fontSize: "0.7em"
|
|
|
|
}}>
|
|
|
|
}} className="description-view">
|
|
|
|
<IconText type="check" text={release.currentStatus}/>
|
|
|
|
<IconText type="check" text={release.currentStatus}/>
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
<IconText type="upload" text={release.releaseType}/>
|
|
|
|
<IconText type="upload" text={release.releaseType}/>
|
|
|
@ -506,6 +511,9 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
</List.Item>
|
|
|
|
</List.Item>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
@ -546,6 +554,7 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Categories </Text>
|
|
|
|
<Text strong={true}>Categories </Text>
|
|
|
|
{!isCategoriesEditEnabled && (<Text
|
|
|
|
{!isCategoriesEditEnabled && (<Text
|
|
|
|
style={{color: config.theme.primaryColor, cursor: "pointer"}}
|
|
|
|
style={{color: config.theme.primaryColor, cursor: "pointer"}}
|
|
|
@ -590,8 +599,8 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
}</span>
|
|
|
|
}</span>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Tags </Text>
|
|
|
|
<Text strong={true}>Tags </Text>
|
|
|
|
{!isTagsEditEnabled && (<Text
|
|
|
|
{!isTagsEditEnabled && (<Text
|
|
|
|
style={{color: config.theme.primaryColor, cursor: "pointer"}}
|
|
|
|
style={{color: config.theme.primaryColor, cursor: "pointer"}}
|
|
|
@ -636,8 +645,11 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="app-rate">
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
<DetailedRating type="app" uuid={app.applicationReleases[0].uuid} />)}
|
|
|
|
<DetailedRating type="app" uuid={app.applicationReleases[0].uuid} />)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</Spin>
|
|
|
|
</Spin>
|
|
|
|
</Drawer>
|
|
|
|
</Drawer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|