forked from Gitlink/forgeplus-react
项目详情-项目类型显示
This commit is contained in:
parent
47e04190ca
commit
1cdf81eb8a
|
|
@ -161,8 +161,6 @@ class Detail extends Component {
|
|||
}
|
||||
|
||||
getProject = (num) => {
|
||||
const name = window.location.hostname === "localhost" ? "testforgeplus.trustie.net":window.location.hostname;
|
||||
console.log(`wss:${name}/cable`);
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/simple.json`;
|
||||
axios.get(url).then((result) => {
|
||||
|
|
@ -197,9 +195,8 @@ class Detail extends Component {
|
|||
}
|
||||
canvasChannel = () => {
|
||||
const name = window.location.hostname === "localhost" ? "http://testforgeplus.trustie.net":window.location.hostname;
|
||||
console.log(`wss:${name}/cable`);
|
||||
const actioncable = require("actioncable")
|
||||
var project = this.state.project
|
||||
var project = this.state.project;
|
||||
var cable = actioncable.createConsumer(`wss:${name}/cable`);
|
||||
this.canvasChannel1 = cable.subscriptions.create({
|
||||
channel: `MirrorProjectChannel`,
|
||||
|
|
@ -381,10 +378,14 @@ class Detail extends Component {
|
|||
</Tooltip> : ""
|
||||
}
|
||||
{
|
||||
projectDetail && checkLogin && projectDetail.type && projectDetail.type === 2 ?
|
||||
<Tooltip placement={'right'} title={mirror}>
|
||||
<i className="iconfont icon-banbenku font-18 fl mt6 ml10" style={{ color: "#8D90E3" }}></i>
|
||||
</Tooltip> : ""
|
||||
projectDetail && checkLogin && projectDetail.type && projectDetail.type !== 0 ?
|
||||
projectDetail.type === 2 ?
|
||||
<Tooltip title="该项目是一个镜像" className="ml5">
|
||||
<i className="iconfont icon-banbenku font-18" style={{ color: "#8D90E3" }}/>
|
||||
</Tooltip>:
|
||||
<span className="ml5">
|
||||
<i className="iconfont icon-jingxiang font-18 color-green" />
|
||||
</span>:""
|
||||
}
|
||||
</span>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue