From c30e229f730f20bcd10a2d0bc849a485740e1b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Thu, 16 Jun 2022 17:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=91=98=E9=82=80=E8=AF=B7=E9=9D=99?= =?UTF-8?q?=E6=80=81=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 2 +- src/forge/Settings/Collaborator.js | 24 +++++++----- .../Settings/CollaboratorMemberByLink.jsx | 38 +++++++++++++++++++ src/forge/Settings/Index.js | 10 ++--- src/forge/Settings/setting.scss | 29 +++++++++++++- src/forge/css/index.scss | 14 +++---- 6 files changed, 92 insertions(+), 25 deletions(-) create mode 100644 src/forge/Settings/CollaboratorMemberByLink.jsx diff --git a/src/AppConfig.js b/src/AppConfig.js index cd3aca3d4..b4107e460 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : 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; export function initAxiosInterceptors(props) { diff --git a/src/forge/Settings/Collaborator.js b/src/forge/Settings/Collaborator.js index cca2520ae..bc8b01cea 100644 --- a/src/forge/Settings/Collaborator.js +++ b/src/forge/Settings/Collaborator.js @@ -4,9 +4,10 @@ import AddMember from '../Component/AddMember'; import AddGroup from '../Component/AddGroup'; import Member from './CollaboratorMember'; import Group from './CollaboratorGroup'; +import MemberByLink from './CollaboratorMemberByLink'; function Collaborator(props){ - const [ nav , setNav] = useState("1"); + const [ nav , setNav] = useState("3"); const [ newId , setNewId] = useState(undefined); const [ newIdFlag , setNewIdFlag ] = useState(false); const [ addOperation , setAddOperation] = useState(true); @@ -23,11 +24,10 @@ function Collaborator(props){ setNewGroupId(id); } - return (
- { + {/* { author && author.type === "Organization" ? {setNav("1");setNewId(undefined)}}>协作者管理 @@ -35,22 +35,26 @@ function Collaborator(props){ : 协作者管理 - } + } */} + + {setNav("1");setNewId(undefined)}}>协作者管理 + {setNav("3");}}>邀请成员 + {author && author.type === "Organization" && {setNav("2");setNewId(undefined);setNewGroupId(undefined)}}>团队管理} + { - nav === "1" && + (nav === "1" || nav === "3") && } { - (nav !== "1" && addOperation) && + (nav === "2" && addOperation) && }
{ - nav === "1" ? - - : - + nav === "1" ? + : nav === "2" ? + : }
diff --git a/src/forge/Settings/CollaboratorMemberByLink.jsx b/src/forge/Settings/CollaboratorMemberByLink.jsx new file mode 100644 index 000000000..0670a3c18 --- /dev/null +++ b/src/forge/Settings/CollaboratorMemberByLink.jsx @@ -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( +
+
请选择邀请用户权限
+ + 是否需要管理员审核 +
邀请链接
+ 复制链接} className='linkBox'/> +
+
注:
+
+ 1、管理员可通过分享邀请链接的方式,邀请其他成员加入项目
+ 2、若已勾选管理员审核选项,用户接收邀请后管理员可在个人主页中“待办事项”窗口审核成员审核信息,若不需要管理员审核,成员接收邀请后,将直接加入项目 +
+
+
+ ) +} +export default forwardRef(CollaboratorMemberByLink); \ No newline at end of file diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js index a22f55abc..6efc93386 100644 --- a/src/forge/Settings/Index.js +++ b/src/forge/Settings/Index.js @@ -57,7 +57,7 @@ class Index extends Component {
  • - 基本设置 + 基本设置

  • @@ -68,7 +68,7 @@ class Index extends Component { >

    - + 协作者管理

    @@ -80,7 +80,7 @@ class Index extends Component { >

    - + 网络钩子

    @@ -92,7 +92,7 @@ class Index extends Component { >

    - + 分支设置

    @@ -102,7 +102,7 @@ class Index extends Component { >

    - + 项目标记

    diff --git a/src/forge/Settings/setting.scss b/src/forge/Settings/setting.scss index 27a9f0630..0547cc4fd 100644 --- a/src/forge/Settings/setting.scss +++ b/src/forge/Settings/setting.scss @@ -23,7 +23,7 @@ content: ''; } .baseForm{ - padding:15px 30px!important; + padding:15px 0!important; } .collaboratorList{ min-height: 400px; @@ -243,4 +243,31 @@ &>div:last-child{ 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; + } + } } \ No newline at end of file diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 49ab596bb..9990769e7 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -225,21 +225,20 @@ form{ margin-bottom: 12px; border-radius:2px; 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); &>li{ - font-size: 1rem; - padding:0px 0px 0px 20px; + font-size: 15px; + padding:0px 0px 0px 25px; box-sizing: border-box; color: #333; position: relative; & > p{ - height: 62px; - line-height: 62px; + height: 49px; width: 100%; - border-bottom: 1px solid #eee; display: flex; justify-content: space-between; + align-items: center; cursor: pointer; padding-right: 20px; margin:0px; @@ -264,10 +263,9 @@ form{ & li.active::before{ position: absolute; left: 0px; - top: 15px; width: 6px; content: ''; - height: 33px; + height: 100%; // background: #4CACFF; background: $primary-color; }