|
|
@ -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,39 +474,46 @@ 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*/}
|
|
|
|
{(app.type === "ENTERPRISE") && (
|
|
|
|
|
|
|
|
<Link to={`/publisher/apps/${app.id}/add-release`}><Button htmlType="button" size="small">Add
|
|
|
|
<div className="releases-details">
|
|
|
|
new release</Button></Link>)}
|
|
|
|
|
|
|
|
<List
|
|
|
|
{(app.type === "ENTERPRISE") && (
|
|
|
|
style={{paddingTop: 16}}
|
|
|
|
<Link to={`/publisher/apps/${app.id}/add-release`}><Button htmlType="button"
|
|
|
|
grid={{gutter: 16, column: 2}}
|
|
|
|
size="small">Add
|
|
|
|
dataSource={app.applicationReleases}
|
|
|
|
new release</Button></Link>)}
|
|
|
|
renderItem={release => (
|
|
|
|
<List
|
|
|
|
<List.Item>
|
|
|
|
style={{paddingTop: 16}}
|
|
|
|
<Link to={"apps/releases/" + release.uuid}>
|
|
|
|
grid={{gutter: 16, column: 2}}
|
|
|
|
<Card className="release-card">
|
|
|
|
dataSource={app.applicationReleases}
|
|
|
|
<Meta
|
|
|
|
renderItem={release => (
|
|
|
|
avatar={
|
|
|
|
<List.Item>
|
|
|
|
<Avatar size="large" shape="square" src={release.iconPath}/>
|
|
|
|
<Link to={"apps/releases/" + release.uuid}>
|
|
|
|
}
|
|
|
|
<Card className="release-card">
|
|
|
|
title={release.version}
|
|
|
|
<Meta
|
|
|
|
description={
|
|
|
|
avatar={
|
|
|
|
<div style={{
|
|
|
|
<Avatar size="large" shape="square" src={release.iconPath}/>
|
|
|
|
fontSize: "0.7em"
|
|
|
|
}
|
|
|
|
}}>
|
|
|
|
title={release.version}
|
|
|
|
<IconText type="check" text={release.currentStatus}/>
|
|
|
|
description={
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
<div style={{
|
|
|
|
<IconText type="upload" text={release.releaseType}/>
|
|
|
|
fontSize: "0.7em"
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
}} className="description-view">
|
|
|
|
<IconText type="star-o" text={release.rating.toFixed(1)}/>
|
|
|
|
<IconText type="check" text={release.currentStatus}/>
|
|
|
|
</div>
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
}
|
|
|
|
<IconText type="upload" text={release.releaseType}/>
|
|
|
|
/>
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
</Card>
|
|
|
|
<IconText type="star-o" text={release.rating.toFixed(1)}/>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</List.Item>
|
|
|
|
}
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
</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}/>
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
|
|
|
|
<DetailedRating type="app" uuid={app.applicationReleases[0].uuid}/>)}
|
|
|
|
<div className="app-rate">
|
|
|
|
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
|
|
|
|
<DetailedRating type="app" uuid={app.applicationReleases[0].uuid} />)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</Spin>
|
|
|
|
</Spin>
|
|
|
|
</Drawer>
|
|
|
|
</Drawer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|