|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
import {Divider, Row, Col, Typography, Button, Rate, notification} from "antd";
|
|
|
|
|
import {Divider, Row, Col, Typography, Button, Dropdown, notification, Menu, Icon} from "antd";
|
|
|
|
|
import "../../../App.css";
|
|
|
|
|
import ImgViewer from "../../apps/release/images/ImgViewer";
|
|
|
|
|
import StarRatings from "react-star-ratings";
|
|
|
|
@ -89,13 +89,6 @@ class ReleaseView extends React.Component {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showAppInstallModal = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
appInstallModalVisible: true
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
closeAppOperationModal = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
appInstallModalVisible: false,
|
|
|
|
@ -103,10 +96,16 @@ class ReleaseView extends React.Component {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
showAppUninstallModal = () => {
|
|
|
|
|
handleSubscribeClick = (e) => {
|
|
|
|
|
if (e.key === "install") {
|
|
|
|
|
this.setState({
|
|
|
|
|
appUninstallModalVisible: true
|
|
|
|
|
});
|
|
|
|
|
appInstallModalVisible: true // display app install modal
|
|
|
|
|
})
|
|
|
|
|
} else if (e.key === "uninstall") {
|
|
|
|
|
this.setState({
|
|
|
|
|
appUninstallModalVisible: true // display app uninstall modal
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
@ -119,6 +118,13 @@ class ReleaseView extends React.Component {
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const menu = (
|
|
|
|
|
<Menu onClick={this.handleSubscribeClick}>
|
|
|
|
|
<Menu.Item key="install">Install</Menu.Item>
|
|
|
|
|
<Menu.Item key="uninstall">Uninstall</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
@ -152,17 +158,14 @@ class ReleaseView extends React.Component {
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col xl={8} md={10} sm={24} xs={24} style={{float: "right"}}>
|
|
|
|
|
<div>
|
|
|
|
|
<Button.Group style={{float: "right"}}>
|
|
|
|
|
<Button onClick={this.showAppInstallModal} loading={this.state.loading}
|
|
|
|
|
htmlType="button" type="primary" icon="download">Install</Button>
|
|
|
|
|
</Button.Group>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Button.Group style={{float: "right",marginRight:'3%'}}>
|
|
|
|
|
<Button onClick={this.showAppUninstallModal} loading={this.state.loading}
|
|
|
|
|
htmlType="button" type="primary" icon="delete">UnInstall</Button>
|
|
|
|
|
</Button.Group>
|
|
|
|
|
<div style={{
|
|
|
|
|
textAlign: "right"
|
|
|
|
|
}}>
|
|
|
|
|
<Dropdown overlay={menu}>
|
|
|
|
|
<Button type="primary">
|
|
|
|
|
Subscribe <Icon type="down"/>
|
|
|
|
|
</Button>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|