@ -30,7 +30,7 @@ import {
Spin ,
Spin ,
message ,
message ,
Icon ,
Icon ,
Card
Card , Badge
} from 'antd' ;
} from 'antd' ;
import DetailedRating from "../../detailed-rating/DetailedRating" ;
import DetailedRating from "../../detailed-rating/DetailedRating" ;
import { Link } from "react-router-dom" ;
import { Link } from "react-router-dom" ;
@ -487,18 +487,14 @@ class AppDetailsDrawer extends React.Component {
) }
) }
< Text strong = { true } > Releases < / T e x t >
< Text strong = { true } > Releases < / T e x t >
{ /*display add new release only if app type is enterprise*/ }
< div className = "releases-details" >
< div className = "releases-details" >
{ ( app . type === "ENTERPRISE" ) && (
< Link to = { ` /publisher/apps/ ${ app . deviceType } / ${ app . id } /add-release ` } > < Button
htmlType = "button"
size = "small" > Add
new release < / B u t t o n > < / L i n k > ) }
< List
< List
style = { { paddingTop : 16 } }
style = { { paddingTop : 16 } }
grid = { { gutter : 16 , column : 2 } }
grid = { { gutter : 16 , column : 2 } }
pagination = { {
pageSize : 4 , // number of releases per page
size : "small" ,
} }
dataSource = { app . applicationReleases }
dataSource = { app . applicationReleases }
renderItem = { release => (
renderItem = { release => (
< div className = "app-release-cards" >
< div className = "app-release-cards" >
@ -507,7 +503,27 @@ class AppDetailsDrawer extends React.Component {
< Card className = "release-card" >
< Card className = "release-card" >
< Meta
< Meta
avatar = {
avatar = {
< Avatar size = "large" shape = "square" src = { release . iconPath } / >
< div >
{ ( release . currentStatus === "PUBLISHED" ) ? (
< Badge
title = "Published"
style = { {
backgroundColor : '#52c41a' ,
borderRadius : "50%" ,
color : "white"
} }
count = {
< Icon
type = "check-circle" / >
} >
< Avatar size = "large" shape = "square"
src = { release . iconPath } / >
< / B a d g e >
) : (
< Avatar size = "large" shape = "square"
src = { release . iconPath } / >
) }
< / d i v >
}
}
title = { release . version }
title = { release . version }
description = {
description = {
@ -529,10 +545,27 @@ class AppDetailsDrawer extends React.Component {
< / d i v >
< / d i v >
) }
) }
/ >
/ >
< / d i v >
< / d i v >
< Divider dashed = { true } / >
< Divider dashed = { true } / >
{ /*display add new release only if app type is enterprise*/ }
{ ( app . type === "ENTERPRISE" ) && (
< div >
< div style = { { paddingBottom : 16 } } >
< Text >
Add new release for the application
< / T e x t >
< / d i v >
< Link to = { ` /publisher/apps/ ${ app . deviceType } / ${ app . id } /add-release ` } >
< Button
htmlType = "button"
type = "primary"
size = "small" >
Add
< / B u t t o n >
< / L i n k >
< / d i v > ) }
< Divider dashed = { true } / >
< Text strong = { true } > Description < / T e x t >
< Text strong = { true } > Description < / T e x t >
{ ! isDescriptionEditEnabled && (
{ ! isDescriptionEditEnabled && (