|
|
@ -1,17 +1,40 @@
|
|
|
|
import React from 'react';
|
|
|
|
import React from 'react';
|
|
|
|
import {Drawer, Select, Col, Typography, Divider, Tag, notification, List, Button, Spin, message, Icon} from 'antd';
|
|
|
|
import {
|
|
|
|
import "../../../App.css";
|
|
|
|
Drawer,
|
|
|
|
import DetailedRating from "../detailed-rating/DetailedRating";
|
|
|
|
Select,
|
|
|
|
|
|
|
|
Avatar,
|
|
|
|
|
|
|
|
Typography,
|
|
|
|
|
|
|
|
Divider,
|
|
|
|
|
|
|
|
Tag,
|
|
|
|
|
|
|
|
notification,
|
|
|
|
|
|
|
|
List,
|
|
|
|
|
|
|
|
Button,
|
|
|
|
|
|
|
|
Spin,
|
|
|
|
|
|
|
|
message,
|
|
|
|
|
|
|
|
Icon,
|
|
|
|
|
|
|
|
Card
|
|
|
|
|
|
|
|
} from 'antd';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {Meta} = Card;
|
|
|
|
|
|
|
|
import "../../../../App.css";
|
|
|
|
|
|
|
|
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 config from "../../../../public/conf/config.json";
|
|
|
|
import config from "../../../../../public/conf/config.json";
|
|
|
|
import ReactQuill from "react-quill";
|
|
|
|
import ReactQuill from "react-quill";
|
|
|
|
import ReactHtmlParser, {processNodes, convertNodeToElement, htmlparser2} from 'react-html-parser';
|
|
|
|
import ReactHtmlParser, {processNodes, convertNodeToElement, htmlparser2} from 'react-html-parser';
|
|
|
|
|
|
|
|
import "./AppDetailsDrawer.css";
|
|
|
|
|
|
|
|
|
|
|
|
const {Text, Title} = Typography;
|
|
|
|
const {Text, Title} = Typography;
|
|
|
|
const {Option} = Select;
|
|
|
|
const {Option} = Select;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const IconText = ({type, text}) => (
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
<Icon type={type} style={{marginRight: 8}}/>
|
|
|
|
|
|
|
|
{text}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const modules = {
|
|
|
|
const modules = {
|
|
|
|
toolbar: [
|
|
|
|
toolbar: [
|
|
|
|
['bold', 'italic', 'underline', 'strike', 'blockquote'],
|
|
|
|
['bold', 'italic', 'underline', 'strike', 'blockquote'],
|
|
|
@ -389,7 +412,46 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Title editable={{onChange: this.handleNameSave}} level={2}>{name}</Title>
|
|
|
|
<Title editable={{onChange: this.handleNameSave}} level={2}>{name}</Title>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<Divider/>
|
|
|
|
<Divider/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
|
|
|
|
{/*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
|
|
|
|
|
|
|
|
new release</Button></Link>)}
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<List
|
|
|
|
|
|
|
|
grid={{gutter: 16, column: 2}}
|
|
|
|
|
|
|
|
dataSource={app.applicationReleases}
|
|
|
|
|
|
|
|
renderItem={release => (
|
|
|
|
|
|
|
|
<List.Item>
|
|
|
|
|
|
|
|
<a href={"apps/releases/" + release.uuid}>
|
|
|
|
|
|
|
|
<Card className="release-card">
|
|
|
|
|
|
|
|
<Meta
|
|
|
|
|
|
|
|
avatar={
|
|
|
|
|
|
|
|
<Avatar size="large" shape="square" src={release.iconPath}/>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
title={release.version}
|
|
|
|
|
|
|
|
description={
|
|
|
|
|
|
|
|
<div style={{
|
|
|
|
|
|
|
|
fontSize: "0.7em"
|
|
|
|
|
|
|
|
}}>
|
|
|
|
|
|
|
|
<IconText type="check" text={release.currentStatus}/>
|
|
|
|
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
|
|
|
|
<IconText type="upload" text={release.releaseType}/>
|
|
|
|
|
|
|
|
<Divider type="vertical"/>
|
|
|
|
|
|
|
|
<IconText type="star-o" text={release.rating.toFixed(1)}/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</List.Item>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
<Text
|
|
|
|
<Text
|
|
|
@ -463,7 +525,7 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
<span>{
|
|
|
|
<span>{
|
|
|
|
categories.map(category => {
|
|
|
|
categories.map(category => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Tag color="blue" key={category} style={{paddingBottom: 5}}>
|
|
|
|
<Tag color="#108ee9" key={category} style={{marginBottom: 5}}>
|
|
|
|
{category}
|
|
|
|
{category}
|
|
|
|
</Tag>
|
|
|
|
</Tag>
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -508,7 +570,7 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
<span>{
|
|
|
|
<span>{
|
|
|
|
tags.map(tag => {
|
|
|
|
tags.map(tag => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Tag color="gold" key={tag} style={{paddingBottom: 5}}>
|
|
|
|
<Tag color="#34495e" key={tag} style={{marginBottom: 5}}>
|
|
|
|
{tag}
|
|
|
|
{tag}
|
|
|
|
</Tag>
|
|
|
|
</Tag>
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -516,30 +578,6 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
}</span>
|
|
|
|
}</span>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
|
|
|
|
{/*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
|
|
|
|
|
|
|
|
new release</Button></Link>)}
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<List
|
|
|
|
|
|
|
|
itemLayout="horizontal"
|
|
|
|
|
|
|
|
dataSource={app.applicationReleases}
|
|
|
|
|
|
|
|
renderItem={release => (
|
|
|
|
|
|
|
|
<List.Item>
|
|
|
|
|
|
|
|
<List.Item.Meta
|
|
|
|
|
|
|
|
title={<a href={"apps/releases/" + release.uuid}>{release.version}</a>}
|
|
|
|
|
|
|
|
description={
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
Status : <Tag>{release.currentStatus}</Tag> Release Type <Tag
|
|
|
|
|
|
|
|
color="green">{release.releaseType}</Tag>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</List.Item>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
<Divider dashed={true}/>
|
|
|
|
|
|
|
|
|
|
|
|
<DetailedRating type="app" uuid={app.applicationReleases[0].uuid}/>
|
|
|
|
<DetailedRating type="app" uuid={app.applicationReleases[0].uuid}/>
|