From 56c8f7fa82ec376aa2e7688d472c1cba5ea15d34 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 9 Dec 2021 17:31:34 +0800 Subject: [PATCH] =?UTF-8?q?educoder=E9=A1=B9=E7=9B=AE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=AA=E8=AF=BB=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/edu-purge.css | 4 +++ src/forge/Main/CoderDepot.jsx | 42 ++++++++++++++++++++--------- src/forge/Main/Detail.js | 1 + src/forge/Main/sub/DetailBanner.jsx | 24 ++++++++--------- src/forge/Main/tree/Index.jsx | 12 ++++++++- 5 files changed, 58 insertions(+), 25 deletions(-) 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 46ff12014..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时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能) */ @@ -352,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( @@ -402,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} + + } } @@ -577,7 +595,7 @@ function CoderDepot(props){ } {/* 发布 */} { - releaseVersions && + releaseVersions && props.platform && {projectDetail && projectDetail.name} {projectDetail && projectDetail.private && 私有} + { !platform && 只读 }
{ 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) && - + 合并请求 + + 合并请求 } 下载