From 3dffbce8d956041a4f978bdefa8b65db5bff5fb0 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 11 Jun 2021 11:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B4=E9=83=A8=E5=AF=BC=E8=88=AA=E6=A0=8F-?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=B0=8F=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/edu-purge.css | 1 - src/AppConfig.js | 2 +- src/forge/Head/Header.js | 3 ++- src/forge/Main/CoderDepot.jsx | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 4d59fc11..c8f7c907 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -3912,7 +3912,6 @@ html>body #ajax-indicator { text-align: center; height: 70px; box-sizing: border-box; - min-width: 780px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/src/AppConfig.js b/src/AppConfig.js index a9853e2a..034612ec 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/Head/Header.js b/src/forge/Head/Header.js index 6c3f96a6..86bb52c5 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -88,10 +88,11 @@ class NewHeader extends Component { }, 300) }} > - this.onGlobalSearch(value,item)} autoFocus={true} + style={{width:"190px"}} /> ) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index adda25c5..b1c38465 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -239,9 +239,11 @@ function CoderDepot(props){ } }) } - let n = fileInfo && fileInfo.name; const mdFlag = n && n.substring(n.length-3,n.length) === ".md"; + + const { current_user } = props; + const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin)); return( @@ -311,7 +313,7 @@ function CoderDepot(props){ } urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务 - { type === "dir" && projectDetail.type !== 2 && + { fileOperate &&