forked from Gitlink/forgeplus-react
成员邀请静态页面
This commit is contained in:
parent
202ffd1a62
commit
c30e229f73
|
@ -25,7 +25,7 @@ if (isDev) {
|
||||||
}
|
}
|
||||||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student'
|
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
|
||||||
}
|
}
|
||||||
window._debugType = debugType;
|
window._debugType = debugType;
|
||||||
export function initAxiosInterceptors(props) {
|
export function initAxiosInterceptors(props) {
|
||||||
|
|
|
@ -4,9 +4,10 @@ import AddMember from '../Component/AddMember';
|
||||||
import AddGroup from '../Component/AddGroup';
|
import AddGroup from '../Component/AddGroup';
|
||||||
import Member from './CollaboratorMember';
|
import Member from './CollaboratorMember';
|
||||||
import Group from './CollaboratorGroup';
|
import Group from './CollaboratorGroup';
|
||||||
|
import MemberByLink from './CollaboratorMemberByLink';
|
||||||
|
|
||||||
function Collaborator(props){
|
function Collaborator(props){
|
||||||
const [ nav , setNav] = useState("1");
|
const [ nav , setNav] = useState("3");
|
||||||
const [ newId , setNewId] = useState(undefined);
|
const [ newId , setNewId] = useState(undefined);
|
||||||
const [ newIdFlag , setNewIdFlag ] = useState(false);
|
const [ newIdFlag , setNewIdFlag ] = useState(false);
|
||||||
const [ addOperation , setAddOperation] = useState(true);
|
const [ addOperation , setAddOperation] = useState(true);
|
||||||
|
@ -23,11 +24,10 @@ function Collaborator(props){
|
||||||
setNewGroupId(id);
|
setNewGroupId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WhiteBack>
|
<WhiteBack>
|
||||||
<div className="flex-a-center baseForm bbr">
|
<div className="flex-a-center baseForm bbr">
|
||||||
{
|
{/* {
|
||||||
author && author.type === "Organization" ?
|
author && author.type === "Organization" ?
|
||||||
<span>
|
<span>
|
||||||
<span style={{cursor:"pointer"}} className={nav === "1" ? "font-18 text-black color-blue":"font-18 text-black"} onClick={()=>{setNav("1");setNewId(undefined)}}>协作者管理</span>
|
<span style={{cursor:"pointer"}} className={nav === "1" ? "font-18 text-black color-blue":"font-18 text-black"} onClick={()=>{setNav("1");setNewId(undefined)}}>协作者管理</span>
|
||||||
|
@ -35,22 +35,26 @@ function Collaborator(props){
|
||||||
</span>
|
</span>
|
||||||
:
|
:
|
||||||
<span className="font-18 text-black">协作者管理</span>
|
<span className="font-18 text-black">协作者管理</span>
|
||||||
}
|
} */}
|
||||||
|
<span>
|
||||||
|
<span style={{cursor:"pointer"}} className={nav === "1" ? "font-15 text-black color-blue":"font-15 text-black"} onClick={()=>{setNav("1");setNewId(undefined)}}>协作者管理</span>
|
||||||
|
<span style={{cursor:"pointer"}} className={nav === "3" ? "font-15 text-black color-blue ml30":"font-15 text-black ml30"} onClick={()=>{setNav("3");}}>邀请成员</span>
|
||||||
|
{author && author.type === "Organization" && <span style={{cursor:"pointer"}} className={nav === "2" ? "font-15 text-black ml30 color-blue":"font-15 text-black ml30"} onClick={()=>{setNav("2");setNewId(undefined);setNewGroupId(undefined)}}>团队管理</span>}
|
||||||
|
</span>
|
||||||
{
|
{
|
||||||
nav === "1" &&
|
(nav === "1" || nav === "3") &&
|
||||||
<AddMember getID={getID} login showNotification={props.showNotification}/>
|
<AddMember getID={getID} login showNotification={props.showNotification}/>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
(nav !== "1" && addOperation) &&
|
(nav === "2" && addOperation) &&
|
||||||
<AddGroup getGroupID={getGroupID} organizeId={owner}/>
|
<AddGroup getGroupID={getGroupID} organizeId={owner}/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
nav === "1" ?
|
nav === "1" ? <Member newId={newId} flag={newIdFlag} projectsId={projectsId} owner={owner} project_id={props.project_id} author={props.projectDetail && props.projectDetail.author} showNotification={props.showNotification}/>
|
||||||
<Member newId={newId} flag={newIdFlag} projectsId={projectsId} owner={owner} project_id={props.project_id} author={props.projectDetail && props.projectDetail.author} showNotification={props.showNotification}/>
|
: nav === "2" ? <Group setAddOperation={setAddOperation} owner={owner} projectsId={projectsId} newGroupId={newGroupId}/>
|
||||||
:
|
: <MemberByLink newId={newId} flag={newIdFlag} projectsId={projectsId} owner={owner} project_id={props.project_id} author={props.projectDetail && props.projectDetail.author} showNotification={props.showNotification}/>
|
||||||
<Group setAddOperation={setAddOperation} owner={owner} projectsId={projectsId} newGroupId={newGroupId}/>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</WhiteBack>
|
</WhiteBack>
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
import React, { useEffect, useState , useImperativeHandle , forwardRef } from 'react';
|
||||||
|
import { Select, Checkbox, Button , Input , Spin , Table , Tooltip , Pagination , Popconfirm } from "antd";
|
||||||
|
import axios from 'axios';
|
||||||
|
import NoneData from "../Nodata";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import { getImageUrl } from "educoder";
|
||||||
|
|
||||||
|
const { Search } = Input;
|
||||||
|
const LIMIT = 15;
|
||||||
|
const optionList = [
|
||||||
|
{value: "manager",name: "管理员 - 拥有仓库设置功能、代码库读、写操作权限"},
|
||||||
|
{value: "developer",name: "开发人员 - 拥有代码库读、写操作权限"},
|
||||||
|
{value: "reporter",name: "报告者 - 拥有代码库读操作权限"}
|
||||||
|
];
|
||||||
|
function CollaboratorMemberByLink({projectsId,owner,project_id,author,showNotification,newId,flag}){
|
||||||
|
|
||||||
|
return(
|
||||||
|
<div className='addMemByLinkBox'>
|
||||||
|
<div className='font-16 mt20 mb5'>请选择邀请用户权限</div>
|
||||||
|
<Select className='selectBox' defaultValue="developer">
|
||||||
|
{optionList.map(item=>{
|
||||||
|
return <Select.Option value={item.value}>{item.name}</Select.Option>
|
||||||
|
})}
|
||||||
|
</Select>
|
||||||
|
<Checkbox className='font-15 checkBox'>是否需要管理员审核</Checkbox>
|
||||||
|
<div className='font-16 mt10 mb5'>邀请链接</div>
|
||||||
|
<Input addonAfter={<Button type='primary'>复制链接</Button>} className='linkBox'/>
|
||||||
|
<div className='tipBox mt20'>
|
||||||
|
<div>注: </div>
|
||||||
|
<div className='ml5'>
|
||||||
|
1、管理员可通过分享邀请链接的方式,邀请其他成员加入项目<br/>
|
||||||
|
2、若已勾选管理员审核选项,用户接收邀请后管理员可在个人主页中“待办事项”窗口审核成员审核信息,若不需要管理员审核,成员接收邀请后,将直接加入项目
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default forwardRef(CollaboratorMemberByLink);
|
|
@ -57,7 +57,7 @@ class Index extends Component {
|
||||||
<li className={flag ? "active" : ""}>
|
<li className={flag ? "active" : ""}>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/settings`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings`} className="w-100">
|
||||||
<i className="iconfont icon-huabanfuben font-18 mr10"></i>基本设置
|
<i className="iconfont icon-huabanfuben font-15 mr10"></i>基本设置
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -68,7 +68,7 @@ class Index extends Component {
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/settings/collaborators`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/collaborators`} className="w-100">
|
||||||
<i className="iconfont icon-chengyuan font-18 mr10"></i>
|
<i className="iconfont icon-chengyuan font-15 mr10"></i>
|
||||||
协作者管理
|
协作者管理
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
@ -80,7 +80,7 @@ class Index extends Component {
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="w-100">
|
||||||
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
|
<i className="iconfont icon-a-xuanzhongwebhookicon font-15 mr10 color-grey-9"></i>
|
||||||
网络钩子
|
网络钩子
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
@ -92,7 +92,7 @@ class Index extends Component {
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/settings/branches`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/branches`} className="w-100">
|
||||||
<i className="iconfont icon-fenzhi font-20 mr10"></i>
|
<i className="iconfont icon-fenzhi font-15 mr10"></i>
|
||||||
分支设置
|
分支设置
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
@ -102,7 +102,7 @@ class Index extends Component {
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/settings/labels`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/labels`} className="w-100">
|
||||||
<i className="iconfont icon-xiangmubiaoqian font-18 mr10 color-grey-6"></i>
|
<i className="iconfont icon-xiangmubiaoqian font-15 mr10 color-grey-6"></i>
|
||||||
项目标记
|
项目标记
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
content: '';
|
content: '';
|
||||||
}
|
}
|
||||||
.baseForm{
|
.baseForm{
|
||||||
padding:15px 30px!important;
|
padding:15px 0!important;
|
||||||
}
|
}
|
||||||
.collaboratorList{
|
.collaboratorList{
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
|
@ -243,4 +243,31 @@
|
||||||
&>div:last-child{
|
&>div:last-child{
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.addMemByLinkBox{
|
||||||
|
color:#202d40;
|
||||||
|
.selectBox {
|
||||||
|
width: 55%;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.checkBox{
|
||||||
|
color:#151d40;
|
||||||
|
}
|
||||||
|
.tipBox{
|
||||||
|
background-color:rgba(199, 209, 255, 0.17);
|
||||||
|
color:#7e849e;
|
||||||
|
padding: 20px 150px 20px 25px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.linkBox{
|
||||||
|
width: 55%;
|
||||||
|
.ant-input-group-addon{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.ant-btn{
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -225,21 +225,20 @@ form{
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
border-radius:2px;
|
border-radius:2px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
// box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
padding: 20px 0;
|
||||||
border:1px solid rgba(79, 108, 188, 0.21);
|
border:1px solid rgba(79, 108, 188, 0.21);
|
||||||
&>li{
|
&>li{
|
||||||
font-size: 1rem;
|
font-size: 15px;
|
||||||
padding:0px 0px 0px 20px;
|
padding:0px 0px 0px 25px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: #333;
|
color: #333;
|
||||||
position: relative;
|
position: relative;
|
||||||
& > p{
|
& > p{
|
||||||
height: 62px;
|
height: 49px;
|
||||||
line-height: 62px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
|
@ -264,10 +263,9 @@ form{
|
||||||
& li.active::before{
|
& li.active::before{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 15px;
|
|
||||||
width: 6px;
|
width: 6px;
|
||||||
content: '';
|
content: '';
|
||||||
height: 33px;
|
height: 100%;
|
||||||
// background: #4CACFF;
|
// background: #4CACFF;
|
||||||
background: $primary-color;
|
background: $primary-color;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue