From 007feded68b649c200612be38974e8f9ab54800c Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 10 Sep 2021 15:02:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/Sort.jsx | 4 ++-- src/forge/Main/Detail.js | 2 +- src/forge/Main/Index.js | 20 +++++++++++++------- src/forge/New/Index.js | 31 ++++++++++++++++++------------- src/forge/Team/List.jsx | 14 +++++++------- src/forge/css/index.scss | 12 ++++++++++++ src/forge/users/InfosUser.js | 13 +++++++------ 7 files changed, 60 insertions(+), 36 deletions(-) diff --git a/src/forge/Component/Sort.jsx b/src/forge/Component/Sort.jsx index 58f8a5d2..a15f04da 100644 --- a/src/forge/Component/Sort.jsx +++ b/src/forge/Component/Sort.jsx @@ -2,9 +2,9 @@ import React from 'react'; import {Popover} from 'antd'; import './Component.scss'; -export default (({menu , children})=>{ +export default (({menu , children, overlayClassName})=>{ return( - + {children} ) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 0a4a178c..15791aa7 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -494,7 +494,7 @@ class Detail extends Component { } { projectDetail && projectDetail.type && projectDetail.type !== 0 ? - 镜像自 {projectDetail.mirror_url} + 导入于 {projectDetail.mirror_url} : "" } diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index 6ba2d34c..512595eb 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -255,14 +255,14 @@ class Index extends Component { newItem = ()=>{ return( - - +
    +
  • {this.props.history.push('/projects/deposit/new')}}>新建项目 - - +
  • +
  • {this.props.history.push('/projects/mirror/new')}}>导入项目 - -
+ + ) } @@ -392,7 +392,13 @@ class Index extends Component {
{ current_user && current_user.login && - + 新建 diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js index 50859e30..222782ef 100644 --- a/src/forge/New/Index.js +++ b/src/forge/New/Index.js @@ -155,7 +155,7 @@ class Index extends Component { if (mirror_status === 2 && sessionStorage.newProjectValue) { Modal.warning({ title: '警告', - content: '镜像项目创建失败!请按操作规范重新创建项目!', + content: '项目导入失败!请按操作规范重新创建项目!', }); let newProjectValue = JSON.parse(sessionStorage.newProjectValue); if (newProjectValue) { @@ -195,13 +195,16 @@ class Index extends Component { subMitFrom = () => { this.props.form.validateFieldsAndScroll((err, values) => { - console.log(err); + console.log(values); if (!err) { this.setState({ isSpin: true }) const { projectsType } = this.props.match.params; - const { project_language_id, project_category_id, license_id, ignore_id , owners_id , owners_name } = this.state; + const { + project_language_id, project_category_id, license_id, ignore_id , owners_id , + ignoreFlag,licenseFlag,categoreFlag,languageFlag + } = this.state; const decoderPass = Base64.encode(values.password); const url = (projectsType && projectsType === "mirror") ? "/projects/migrate.json" : "/projects.json"; // 新建项目的时候,暂存数据,如果失败,返回的时候可以重新赋值 @@ -209,10 +212,10 @@ class Index extends Component { axios.post(url, { ...values, auth_password:decoderPass, - project_language_id, - project_category_id, - license_id, - ignore_id, + project_language_id:languageFlag ? project_language_id : undefined, + project_category_id:categoreFlag ? project_category_id : undefined, + license_id:licenseFlag ? license_id : undefined, + ignore_id:ignoreFlag ? ignore_id : undefined, user_id:owners_id }).then((result) => { if (result && result.data.id) { @@ -339,7 +342,7 @@ class Index extends Component { projectsType && projectsType === "mirror" && @@ -358,12 +361,14 @@ class Index extends Component { projectsType && projectsType === "mirror" &&

- 需要授权验证 - 如果导入项目为私有仓库,则必须填写相应平台正确的用户名和密码

+ 需要授权验证 + 如果导入项目为私有仓库,则必须填写相应平台正确的用户名和密码 +

{ mirrorCheck &&
用户名 + + )}
@@ -545,7 +550,7 @@ class Index extends Component { > {getFieldDecorator('project_category', { rules: [{ - required: categoreFlag, message: '请选择大类别', + required: categoreFlag, message: '请选择项目类别', }, { validator: (rule, value, callback) => this.checkId(rule, value, callback, CategoryList, '项目类别') }], @@ -592,7 +597,7 @@ class Index extends Component { 注: 为必填项,否则为选填
- + 取消
diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx index 5eebfc38..ea23ab07 100644 --- a/src/forge/Team/List.jsx +++ b/src/forge/Team/List.jsx @@ -61,14 +61,14 @@ function List(props){ ) const menu_new=( - - +
    +
  • {props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建项目 - - +
  • +
  • {props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>导入项目 - -
+ + ) return( @@ -81,7 +81,7 @@ function List(props){

{ organizeDetail && organizeDetail.can_create_project ? - + + 新建项目 :""} diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 00e46b6f..a28b4d0a 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -270,4 +270,16 @@ form{ background-color: #DF0002!important; border-color: #DF0002; color: #fff; +} +.newPopUl{ + li{ + height: 30px; + line-height: 30px; + border-bottom: 1px solid #eee; + min-width: 78px; + text-align: center; + &:last-child{ + border-bottom: none; + } + } } \ No newline at end of file diff --git a/src/forge/users/InfosUser.js b/src/forge/users/InfosUser.js index d6f30ee8..bcfd75ff 100644 --- a/src/forge/users/InfosUser.js +++ b/src/forge/users/InfosUser.js @@ -114,14 +114,14 @@ class InfosUser extends Component { ); newItem =()=> ( -

- +
    +
  • {this.props.history.push('/projects/deposit/new')}} >新建项目 - - +
  • +
  • {this.props.history.push('/projects/mirror/new')}}>导入项目 - -
+ + ); @@ -192,6 +192,7 @@ class InfosUser extends Component { trigger={["hover"]} placement="bottom" className="mr50" + overlayClassName="newPopUl" > From 828de5d7708227038b2c09d19cc2678080f1caa5 Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 10 Sep 2021 15:10:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9C=81=E7=95=A5=E6=95=88=E6=9E=9C=E6=B2=A1=E6=9C=89=E7=94=9F?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/users/Team-item.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forge/users/Team-item.jsx b/src/forge/users/Team-item.jsx index a8830409..5efdbe22 100644 --- a/src/forge/users/Team-item.jsx +++ b/src/forge/users/Team-item.jsx @@ -6,7 +6,7 @@ function TeamItem({item,history}){
{history.push(`/${item.name}`)}} style={{cursor:"pointer"}}>
- {item.nickname} + {item.nickname}
{item.description}
From 8c0757c942ad74bd55f350ee51c247b75baaf67b Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 10 Sep 2021 18:20:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8A=A0=E7=B2=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/Component.scss | 5 ++++- src/forge/Main/Index.scss | 8 +++++++- src/forge/Main/list.scss | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index 0845a109..30a62005 100644 --- a/src/forge/Component/Component.scss +++ b/src/forge/Component/Component.scss @@ -220,7 +220,10 @@ li.ant-menu-item{ .ant-btn-primary{ color: #fff; background-color: #466AFF; - border-color: #466AFF; + border:none; + &:hover{ + background-color: rgba(70,106,255,0.85); + } } .focusPanelHeadInfo{ padding:14px 16px; diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 0062d79a..1158c38e 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -20,6 +20,9 @@ span{ margin-left: 4px; color: #333!important; + &:last-child{ + font-weight: 500; + } } &:hover span,&:hover i{ color: #466AFF!important; @@ -143,7 +146,10 @@ .ant-btn-primary{ color: #fff; background-color: #466AFF; - border-color: #466AFF; + border: none; + &:hover{ + background-color: rgba(70,106,255,0.85); + } } } } diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss index 90dd697a..72c3437e 100644 --- a/src/forge/Main/list.scss +++ b/src/forge/Main/list.scss @@ -237,7 +237,6 @@ line-height: 24px; display: block; color: #000!important; - font-weight: 500; &> span.num{ line-height: 24px; margin-left: 5px; @@ -260,6 +259,9 @@ left: 0px; width:100%; } + &.active span{ + font-weight: 500; + } &.active a::after{ background-color: #466AFF; }