forked from Gitlink/forgeplus-react
merge 4e48b0b363
This commit is contained in:
parent
350769d3d7
commit
a1b82d833b
|
@ -20,13 +20,6 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
if(owner && repo && visible===true){
|
||||
getTeam();
|
||||
}
|
||||
if(!visible){
|
||||
setFieldsValue({
|
||||
owner_name:undefined,
|
||||
identifier:undefined
|
||||
})
|
||||
setValue(undefined)
|
||||
}
|
||||
},[repo,owner,visible])
|
||||
|
||||
function getTeam(){
|
||||
|
@ -130,8 +123,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
{getFieldDecorator("owner_name",{
|
||||
rules:[{required:true,message:"请输入目标用户名"}]
|
||||
})(
|
||||
// <Input placeholder="请输入目标用户" autoComplete={"off"}/>
|
||||
<SearchUser getUser={getUser} width={"100%"} placeholder="请输入目标用户" value={value}/>
|
||||
<Input placeholder="请输入目标用户" autoComplete={"off"}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
}
|
||||
|
@ -156,11 +148,11 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
</Form.Item>
|
||||
}
|
||||
|
||||
<Form.Item label="仓库标识:" style={{marginBottom:"0px"}}>
|
||||
<Form.Item label="仓库标识:">
|
||||
{getFieldDecorator("identifier",
|
||||
{
|
||||
rules:[
|
||||
{required:true,message:"请输入仓库标识!"},
|
||||
{required:true,message:"请输入仓库标识"},
|
||||
{
|
||||
validator:checkIdentifier
|
||||
}
|
||||
|
|
|
@ -14,8 +14,24 @@ function Notify(props){
|
|||
const [ isSpin , setIsSpin ] = useState(true);
|
||||
|
||||
useEffect(()=>{
|
||||
props && props.deleteEvent("notify",0);
|
||||
},[])
|
||||
if(username){
|
||||
getList();
|
||||
}
|
||||
},[username,page])
|
||||
|
||||
function getList(){
|
||||
const url = `/users/${username}/applied_messages.json`;
|
||||
Axios.get(url,{
|
||||
params:{
|
||||
page,per_page:limit
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
setList(result.data.applied_messages);
|
||||
setTotal(result.data.total_count);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
if(username){
|
||||
|
|
|
@ -14,6 +14,7 @@ function UndoEvent(props){
|
|||
const [ total , setTotal ] = useState(0);
|
||||
const [ isSpin , setIsSpin ] = useState(true);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(username){
|
||||
setIsSpin(true);
|
||||
|
@ -93,7 +94,7 @@ function UndoEvent(props){
|
|||
i.status === "canceled" && <span className="color-grey-9">对方已取消转移</span>
|
||||
}
|
||||
{
|
||||
i.status === "accepted" && <span className="color-grey-9">已接受</span>
|
||||
i.status === "accept" && <span className="color-grey-9">已接受</span>
|
||||
}
|
||||
{
|
||||
i.status === "refused" && <span className="color-grey-9">已拒绝</span>
|
||||
|
|
|
@ -31,7 +31,8 @@ class Setting extends Component {
|
|||
project_units:['home',"activity","code"],
|
||||
divertVisible:false,
|
||||
is_transfering:undefined,
|
||||
projectName:undefined
|
||||
projectName:undefined,
|
||||
permission:undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -236,12 +237,14 @@ class Setting extends Component {
|
|||
const { getFieldDecorator } = this.props.form;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { projectDetail } = this.props;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
|
||||
const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state;
|
||||
let mirror = projectDetail && projectDetail.mirror;
|
||||
let type = projectDetail && projectDetail.type;
|
||||
const forked_from_project_id = this.props && this.props.projectDetail && this.props.projectDetail.forked_from_project_id;
|
||||
|
||||
const { CategoryList, LanguageList, private_check ,loading , divertVisible , permission , is_transfering } = this.state;
|
||||
return (
|
||||
<div>
|
||||
<DivertModal
|
||||
|
|
|
@ -189,7 +189,7 @@ class Infos extends Component {
|
|||
render() {
|
||||
const { current_user } = this.props;
|
||||
const { username } = this.props.match.params;
|
||||
const { user, isSpin, route_type , undo_events , menuKey } = this.state;
|
||||
const { user, isSpin, route_type , undo_events , menuKey , project_type } = this.state;
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Spin spinning={isSpin}>
|
||||
|
@ -272,6 +272,97 @@ class Infos extends Component {
|
|||
}
|
||||
</div>
|
||||
</div>
|
||||
{current_user && user && user.login === current_user.login ? (
|
||||
<div className="bgcF">
|
||||
<div className="list-l-Menu">
|
||||
<li className={project_type && project_type === "notice" ? "active" : ""}>
|
||||
<p onClick={() => this.undo_link()}>
|
||||
<span className="font-16 color-grey-3">
|
||||
<i className="iconfont icon-dahuizhongzuo3x font-15 mr5"></i>
|
||||
待办事项
|
||||
</span>
|
||||
<span className="text-yellow font-16">
|
||||
{user.undo_events}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
):""}
|
||||
|
||||
<div className="bgcF">
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle" onClick={() => this.change_project_type(undefined)}>
|
||||
<i className="iconfont icon-xiangmuleixing font-15 mr5"></i>
|
||||
项目类型
|
||||
<i className="iconfont icon-youjiantou font-15 mr20 color-grey-9 pull-right"></i>
|
||||
</li>
|
||||
<li className={project_type && project_type === "common" ? "active" : ""} onClick={() => this.change_project_type("common")}>
|
||||
<p>
|
||||
<span className="font-16">开源托管项目</span>
|
||||
<span className="color-blue">
|
||||
{user && user.common_projects_count}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
<li className={project_type && project_type === "mirror" ? "active" : ""} onClick={() => this.change_project_type("mirror")}>
|
||||
<p>
|
||||
<span className="font-16">开源镜像项目</span>
|
||||
<span className="color-blue">
|
||||
{user && user.mirror_projects_count}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
<li className={project_type && project_type === "sync_mirror" ? "active" : ""} onClick={() => this.change_project_type("sync_mirror")}>
|
||||
<p>
|
||||
<span className="font-16">镜像托管项目</span>
|
||||
<span className="color-blue">
|
||||
{user && user.sync_mirror_projects_count}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{
|
||||
current_user && current_user.login && current_user.login === username &&
|
||||
<div className="bgcF">
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle">
|
||||
<i className="iconfont icon-gongzuoliu font-15 mr5"></i>
|
||||
DevOps工作流
|
||||
<i className="iconfont icon-youjiantou font-15 mr20 color-grey-9 pull-right"></i>
|
||||
</li>
|
||||
<li className={project_type && project_type === "CIService" ? "active" : ""} onClick={() => this.change_devops_type("CIService")}>
|
||||
<p>
|
||||
<span className="font-16 color-grey-3">CI服务</span>
|
||||
</p>
|
||||
</li>
|
||||
{/* <li className={project_type && project_type === "CDService" ? "active" : ""} onClick={() => this.change_devops_type("CDService")}>
|
||||
<p>
|
||||
<span className="font-16">CD服务</span>
|
||||
<span className="color-blue">
|
||||
{user && user.common_projects_count}
|
||||
</span>
|
||||
</p>
|
||||
</li> */}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
<div className="bgcF">
|
||||
<div className="list-l-Menu">
|
||||
<li className={project_type && project_type === "organizes" ? "active" : ""}>
|
||||
<p onClick={() => this.organize_link()} >
|
||||
<span className="font-16 color-grey-3">
|
||||
<i className="iconfont icon-itsm-liuchengguanli font-15 mr5"></i>
|
||||
组织
|
||||
</span>
|
||||
<span className="color-blue font-16">
|
||||
{user && user.user_org_count}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="list-right">
|
||||
{ !route_type && menuKey &&
|
||||
|
|
Loading…
Reference in New Issue