diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 694ef054c..6191978d2 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -3945,6 +3945,10 @@ html>body #ajax-indicator { margin-left: 10px; color: #2FC25B; } +.privateTag.red{ + color: #FF6832; + border:1px solid #FF6832; +} .head-nav { text-align: center; height: 58px; diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 76bce5c7b..6090c69ef 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -23,6 +23,7 @@ import Nodata from '../Nodata'; import Invite from './sub/Invite'; import CheckProfile from '../Component/ProfileModal/Profile'; import RenderHtml from '../../components/render-html'; +import { Base64 } from 'js-base64'; /** * projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能) */ @@ -279,6 +280,7 @@ function CoderDepot(props){ // 子目录路径返回链接 function returnUlr(url){ let enBranch = turnbar(branchName); + setType('dir'); props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`); } // 点击跳转到子目录 @@ -351,7 +353,7 @@ function CoderDepot(props){ const { current_user } = props; const baseOper = current_user && current_user.login && issuesFlag; - const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag; + const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag && props.platform; const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin)); return( @@ -401,7 +403,7 @@ function CoderDepot(props){ 分支:{branchName || defaultBranch} } - { + { treeValuePath && treeValuePath.length > 0 ? - - - 分支 - {projectDetail && projectDetail.branches_count} - + { + props.platform ? + + + 分支 + {projectDetail && projectDetail.branches_count} + + : + + + 分支 + {projectDetail && projectDetail.branches_count} + + } + { + props.platform ? - - 标签 - {projectDetail && projectDetail.tags_count} - + + 标签 + {projectDetail && projectDetail.tags_count} + : + + + 标签 + {projectDetail && projectDetail.tags_count} + + } } @@ -463,12 +482,18 @@ function CoderDepot(props){ (dirInfo && dirInfo.length>0) || fileInfo ?
{ - lastCommit && + ((lastCommit && lastCommit.message) || lastCommitAuthor) &&
- -
-
-
+ { + lastCommitAuthor && + + } + { + lastCommit.message && +
+
+
+ } { hideBtn && changeHide(hide)}> } {lastCommit.time_from_now} @@ -490,6 +515,7 @@ function CoderDepot(props){ item={item} projectsId={projectsId} goToSubRoot={goToSubRoot} + platform={props.platform} /> ) }) @@ -569,7 +595,7 @@ function CoderDepot(props){ } {/* 发布 */} { - releaseVersions && + releaseVersions && props.platform && - goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}> - {item.name} - + { + (!platform && item.image_type) ? + {item.name} + : + goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}> + {item.name} + + } diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 6fa8a0d43..222bfad5a 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -507,6 +507,7 @@ class Detail extends Component { {projectDetail && projectDetail.name}
{projectDetail && projectDetail.private && 私有} + { !platform && 只读 }
{ diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 5f3692929..dbdf4b1c1 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -246,11 +246,14 @@ display: flex; justify-content: space-between; align-items: flex-start; - border-bottom: 1px solid #d9d9d9; padding:12px 20px 11px; border-radius: 4px 4px 0px 0px; border: 1px solid rgba(42, 97, 255, 0.23); + border-bottom: none; background-color: #FAFCFF; + &+.listtablebody{ + border-top-color: rgba(42, 97, 255, 0.23); + } .ellipsistxt{ &:hover .markdown-body{ color: #466AFF; @@ -331,7 +334,6 @@ .listtablebody{ border-radius:0px 0px 4px 4px ; border: 1px solid #D0D0D0; - border-top: none; li.listtablepath{ a{color: #40a9ff;} p{ diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index 703158319..5f16b9e26 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -67,16 +67,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa :"" } { - item.menu_name === "versions" && -
  • - - - 维基(Wiki) - -
  • - } - { - item.menu_name === "wiki" && platform ? + item.menu_name === "devops" ?
  • {/* */} @@ -97,7 +88,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
  • } */} { - item.menu_name === "devops" && + item.menu_name === "versions" &&
  • @@ -106,6 +97,15 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
  • } + { + item.menu_name === "wiki" && +
  • + + + 维基(Wiki) + +
  • + } { item.menu_name === "activity" &&
  • @@ -116,7 +116,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
  • } { - item.menu_name === "settings" && + item.menu_name === "settings" && platform &&
  • 0 ? "iconfont icon-cangkushezhiicon color-grey-3 mr5 font-14":"iconfont icon-cangkushezhiicon color-grey-6 font-14 mr5"}> diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index 714bf3533..d2dde0894 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -5,11 +5,21 @@ import { Link } from 'react-router-dom'; import { getImageUrl } from 'educoder'; import { Dropdown , Menu , Spin } from 'antd'; import './Index.scss'; +import { Base64 } from 'js-base64'; import Tree from '../img/tree.png'; import Axios from 'axios'; function turnbar(str){ + // const s = '!!@/::"“”<《》>||??%$¥'; + // for(var i=0;i -1){ + // return Base64.encode(str); + // }else{ + // continue; + // } + // } if(str && str.length>0 && str.indexOf("/")>-1){ return str.replaceAll('/','%2F'); } @@ -91,7 +101,7 @@ function Index(props) {
    { (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && - + 合并请求 + + 合并请求 } 下载 diff --git a/src/modules/courses/css/Courses.css b/src/modules/courses/css/Courses.css index 0d550a5c0..06466b072 100644 --- a/src/modules/courses/css/Courses.css +++ b/src/modules/courses/css/Courses.css @@ -1,6 +1,3 @@ -i.iconfont { - cursor: pointer; -} .overflowHidden1 { overflow: hidden;