diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index 0845a109e..30a62005c 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/Component/Sort.jsx b/src/forge/Component/Sort.jsx index 58f8a5d2f..a15f04da9 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 190bf1d61..560420a66 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 539537c49..3b1f66dba 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/Main/Index.scss b/src/forge/Main/Index.scss index 0062d79ae..1158c38e6 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 90dd697a5..72c3437e9 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; } diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js index 50859e302..222782efd 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 5eebfc385..ea23ab079 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 e1986728e..d9a5b071c 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -273,4 +273,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 d6f30ee89..bcfd75ffc 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" > diff --git a/src/forge/users/Team-item.jsx b/src/forge/users/Team-item.jsx index a88304099..5efdbe22c 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}