forked from Gitlink/forgeplus-react
change
This commit is contained in:
parent
d6c4979bff
commit
7847637355
|
@ -1617,7 +1617,7 @@ a.decoration {
|
|||
}
|
||||
|
||||
.mt8 {
|
||||
margin-top: 8px;
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
|
||||
.mt9 {
|
||||
|
|
|
@ -66,5 +66,8 @@ $flex:flex;
|
|||
color: #fff;
|
||||
padding:0px 15px;
|
||||
}
|
||||
.statusDivider{
|
||||
margin: 8px 0 0 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -185,7 +185,7 @@ class Infos extends Component {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{current_user && user && current_user.id === user.id && (
|
||||
{/* {current_user && user && current_user.id === user.id && (
|
||||
<div className="bgcF">
|
||||
<div className="list-l-Menu">
|
||||
<p className="list-l-p pd20" onClick={() => this.undo_link()}>
|
||||
|
@ -199,7 +199,7 @@ class Infos extends Component {
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
)} */}
|
||||
<div className="bgcF">
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle" onClick={() => this.change_project_type(undefined)}>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Menu, Input, Spin, Pagination, Popover, Button } from "antd";
|
||||
import { Menu, Input, Spin, Pagination, Popover, Button, Divider } from "antd";
|
||||
|
||||
import axios from "axios";
|
||||
import ListItem from "../Main/IndexItem";
|
||||
|
@ -20,7 +20,7 @@ class InfosUser extends Component {
|
|||
projectsList: undefined,
|
||||
total: undefined,
|
||||
category: undefined,
|
||||
is_public:"public"
|
||||
is_public: undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -93,11 +93,15 @@ class InfosUser extends Component {
|
|||
};
|
||||
|
||||
// 切换公有私有
|
||||
changeStatus=(is_public)=>{
|
||||
this.setState({
|
||||
is_public
|
||||
})
|
||||
this.get_projects(is_public);
|
||||
changeStatus=(check_is_public)=>{
|
||||
const {is_public} = this.state
|
||||
const new_is_public = is_public === check_is_public ? undefined : check_is_public
|
||||
|
||||
// this.setState({
|
||||
// is_public: new_is_public
|
||||
// })
|
||||
this.state.is_public = new_is_public
|
||||
this.get_projects(new_is_public);
|
||||
}
|
||||
menu =()=> (
|
||||
<Menu onClick={this.ChangeSoryBy}>
|
||||
|
@ -209,6 +213,9 @@ class InfosUser extends Component {
|
|||
user && current_user && user.login === current_user.login ?
|
||||
<p className="infoStatus">
|
||||
<span className={is_public === "public" ? "active" : "" } onClick={()=>this.changeStatus("public")}>公有</span>
|
||||
{
|
||||
!is_public && <Divider type={"vertical"} className="statusDivider" ></Divider>
|
||||
}
|
||||
<span className={is_public === "private" ? "active" : "" } onClick={()=>this.changeStatus("private")}>私有</span>
|
||||
</p>
|
||||
:""
|
||||
|
|
Loading…
Reference in New Issue