From 50627aba6be4efdf0e27a16cface4c59170bd24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 28 Sep 2021 15:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=94=B9=E7=89=88-=E6=B5=8B=E8=AF=95-?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=8C=E5=8F=91=E8=A1=8C=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/forge/Main/CoderRootCommit.js | 12 ++++-------- src/forge/Main/img/tree-black.png | Bin 0 -> 631 bytes src/forge/Main/version/version.js | 9 ++++++--- src/forge/Merge/Files.jsx | 10 +++++----- 5 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 src/forge/Main/img/tree-black.png diff --git a/package.json b/package.json index 736bba88c..04142cb4d 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "scripts": { "start": "node --max_old_space_size=15360 scripts/start.js", "build": "cross-env NODE_ENV=production node --max_old_space_size=15360 scripts/build.js", - "test-build": "NODE_ENV=testBuild node --max_old_space_size=15360 scripts/build.js", + "test-build": "cross-env NODE_ENV=testBuild node --max_old_space_size=15360 scripts/build.js", "pre-build": "NODE_ENV=preBuild node --max_old_space_size=15360 scripts/build.js", "gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json", "ana": "webpack-bundle-analyzer ./stats.json", diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js index 183523888..7b8eaa23a 100644 --- a/src/forge/Main/CoderRootCommit.js +++ b/src/forge/Main/CoderRootCommit.js @@ -29,12 +29,12 @@ function timeFormat(seconds) { //代码库--提交页面 class CoderRootCommit extends Component{ constructor(props){ - super(props) + super(props); this.state={ commitDatas:undefined, dataCount:undefined, limit:10, - page:1, + page: 1, isSpining:false, branchList:undefined } @@ -43,12 +43,8 @@ class CoderRootCommit extends Component{ componentDidMount=()=>{ this.Init(); this.getBranchs(); - // goBack - // addEventListener } - // componentde - // 获取分支列表 getBranchs=()=>{ const { projectsId , owner } = this.props.match.params; @@ -157,7 +153,7 @@ class CoderRootCommit extends Component{
-
{item.message}
+
{item.message}

sha - {truncateCommitId(`${item.sha}`)} + {truncateCommitId(`${item.sha}`)} diff --git a/src/forge/Main/img/tree-black.png b/src/forge/Main/img/tree-black.png new file mode 100644 index 0000000000000000000000000000000000000000..02aa71c3adc567259467d2e29b08d068d9d3747f GIT binary patch literal 631 zcmeAS@N?(olHy`uVBq!ia0vp^IzTMI!3HFAZRTDFQjEnx?oJHr&dIz4a$Hg)JkxxA z8MJ_G4hF{dOa>N^5+IfWVg?501&j>LK$;OGwtxvPtFwR^&K3YEoUwnC3Q*ZYPZ!4! z58kU``~43&h}5}0y0WsFyVEmLB853-m!-#@h={oncdpE}U-&A)L{aaYj?R%I66JNh zlQuX!I?%u@-OTdpw_dK3b9R4r@*`F89p(4G?_EFrb@f$^g@IaA`(%!<{AiPU(mDKF z@Z~Mx^ZfV5y;trGiHez+wRM;MOrN|PFIcmeI(@m8^XsC?+1F{Cf66vZ1JwWy?0e};?Rtpio5{%y|=FDYDKGjV_9i&d46 z=WM7jnWA@dBe$84v8@Eplq|#P%cJ*oPhYY5XN{fDeQ|cN=GiA=_ut?DDc4JHioe9$ zX~k<2n{MZ&SS7?9eo^&6tJhXlZ1S?pFT>R)TRzx-e6C-6(N39}2@Dh3+vadVMbsei>i;Cr8SCw<~+`?56N^;s1O7Ft+?=+PJQz=maRzJzf1=);T3K F0RU_U1wQ}) literal 0 HcmV?d00001 diff --git a/src/forge/Main/version/version.js b/src/forge/Main/version/version.js index 44b20919c..5b48affaf 100644 --- a/src/forge/Main/version/version.js +++ b/src/forge/Main/version/version.js @@ -100,9 +100,12 @@ function version(props) { {item.tag_name}.ZIP

{/* 发行版附件下载 */} - {item.attachments && item.attachments.map((item)=>{ - return({item.title}) - })} + {/* {item.attachments.length !=0 &&

+ 附件: */} + {item.attachments && item.attachments.map((item)=>{ + return({item.title}) + })} + {/*

} */}
) diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index c5bd17688..32215d108 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -1,22 +1,22 @@ -import React ,{useEffect,useState } from 'react'; +import React ,{useEffect,useRef,useState } from 'react'; import { truncateCommitId } from '../common/util'; import { AlignCenter , FlexAJ } from '../Component/layout'; import { Button, Tooltip,Progress, Popover, Anchor } from 'antd'; import './merge.css'; import './Index.scss'; -const {Link} =Anchor; - -function Files({data,history,owner,projectsId}){ +function Files(props){ + const { data,history,owner,projectsId } = props; const [ files , setFiles ] = useState(data && data.files); const [ copyfileTipTitle, setCopyfileTipTitle] = useState("复制文件路径"); const [ isOpen, setIsOpen] = useState(false); + const commitPage = history && history.location && history.location.query && history.location.query.page; useEffect(()=>{ if(data){ setFiles(data.files); } - },[data]) + },[data]); function showDown(flag,index,isBin){ if(!isBin){