diff --git a/src/AppConfig.js b/src/AppConfig.js index 665e85f0..30eb7e9a 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 || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index e23a82c3..ec0a7f6d 100644 --- a/src/forge/DevOps/About.jsx +++ b/src/forge/DevOps/About.jsx @@ -171,7 +171,7 @@ function About(props, ref) {
DevOps开启功能暂未对项目创建者以外的角色开放,可以联系项目创建者进行开启,开启后便可查看构建信息。
:"" } - 了解什么是引擎? + 了解什么是DevOps? 如何使用引擎(Engine)功能? diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index 3302f603..0bad039e 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -66,7 +66,7 @@ export default ((props)=>{ {/* 原本的两种合为一个 */} {return( p.location.state.open_devops?:)} + (p) =>{return( p.location && p.location.state && p.location.state.open_devops?:)} } > diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index f104d711..db68d22a 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -197,7 +197,7 @@ function CoderDepot(props){ let ele = document.getElementById("ptxt"); if(ele){ let h = ele.offsetHeight; - if( h > 35 ) setHideBtn(true); + if( h > 36 ) setHideBtn(true); } } },[projectDetail,lastCommit]) diff --git a/src/forge/Merge/no_data.js b/src/forge/Merge/no_data.js index d5e4ca89..78a62268 100644 --- a/src/forge/Merge/no_data.js +++ b/src/forge/Merge/no_data.js @@ -2,7 +2,7 @@ import React , { Component } from 'react'; import { Link } from "react-router-dom"; class Nodata extends Component{ render(){ - const { _html, projectsId , owner } = this.props; + const { _html, projectsId , owner , user_admin_or_member} = this.props; return(
@@ -12,7 +12,7 @@ class Nodata extends Component{

欢迎使用合并请求!

- 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求 + 合并请求可以帮助您与他人协作编写代码。{ user_admin_or_member && 在使用之前,请先创建一个 合并请求 }
diff --git a/src/forge/Order/Detail.js b/src/forge/Order/Detail.js index 4d1b47cf..9736086c 100644 --- a/src/forge/Order/Detail.js +++ b/src/forge/Order/Detail.js @@ -252,7 +252,7 @@ class Detail extends Component { 添加于 {data && data.created_at} {data && data.user_permission ? ( - +
复制 diff --git a/src/forge/Order/OrderItem.js b/src/forge/Order/OrderItem.js index b3b02ba4..c80feafa 100644 --- a/src/forge/Order/OrderItem.js +++ b/src/forge/Order/OrderItem.js @@ -49,7 +49,7 @@ class OrderItem extends Component { return ( item &&
- {current_user && current_user.login && checkbox} + {(current_user && current_user.login) && user_admin_or_member && checkbox}

{item.name} diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 5b4458f1..97491f94 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -348,7 +348,7 @@ class order extends Component { const { data } = this.state; const { projectsId , owner } = this.props.match.params; if(data && data.user_admin_or_member){ - window.open(`/${owner}/${projectsId}/issues/new`,'_blank'); + this.props.history.push(`/${owner}/${projectsId}/issues/new`,'_blank'); }else{ this.props.showLoginDialog(`/${owner}/${projectsId}/issues/new`); } diff --git a/src/forge/users/GeneralView/ConcentrateBox.jsx b/src/forge/users/GeneralView/ConcentrateBox.jsx index 78573984..b3812b96 100644 --- a/src/forge/users/GeneralView/ConcentrateBox.jsx +++ b/src/forge/users/GeneralView/ConcentrateBox.jsx @@ -1,7 +1,6 @@ import React, { useEffect, useState } from 'react'; import { Modal , Checkbox , Spin , Input } from 'antd'; import Axios from 'axios'; -import { Link } from 'react-router-dom'; import CheckProfile from '../../Component/ProfileModal/Profile'; const { Search } = Input; @@ -113,6 +112,9 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his // 搜索 function onSearch(params) { + if(params === search && params === ""){ + return; + } setCopyAllList(list); value && value.length > 0 ? saveList(value) : setCopyList([]); setPage(1); diff --git a/src/forge/users/GeneralView/ConcentrateProject.jsx b/src/forge/users/GeneralView/ConcentrateProject.jsx index 48875221..d3f99e53 100644 --- a/src/forge/users/GeneralView/ConcentrateProject.jsx +++ b/src/forge/users/GeneralView/ConcentrateProject.jsx @@ -4,7 +4,7 @@ import { Link } from 'react-router-dom'; import axios from 'axios'; import Box from './ConcentrateBox'; -function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfile}) { +function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfile,history}) { const [ list , setList ] = useState(undefined); const [ visible , setVisible ] = useState(false); const [ value , setValue ] = useState([]); @@ -53,6 +53,7 @@ function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfi choosed={value} completeProfile={completeProfile} showCompeleteDialog={showCompeleteDialog} + history={history} /> { list && list.length>0 &&