diff --git a/package-lock.json b/package-lock.json index 96077ad36..9ea84263c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7286,7 +7286,8 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "optional": true }, "aproba": { "version": "1.2.0", @@ -7703,7 +7704,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7759,6 +7761,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7802,12 +7805,14 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "optional": true }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "optional": true } } }, diff --git a/src/forge/Branch/Select.jsx b/src/forge/Branch/Select.jsx index 601b94e8b..4937686d1 100644 --- a/src/forge/Branch/Select.jsx +++ b/src/forge/Branch/Select.jsx @@ -4,7 +4,6 @@ import './branch.scss'; import { getBranch , getTag } from '../GetData/getData'; import SelectOverlay from './SelectOverlay'; - export default (({ projectsId , branch , owner , changeBranch , branchList , tagflag = true })=>{ const [ showValue , setShowValue ] = useState(branch); @@ -26,7 +25,7 @@ export default (({ projectsId , branch , owner , changeBranch , branchList , tag
+
{/* 如果是点击最新则发行版列表页只展示最新的一个 */} - {item.name} + {item.name} 最新
{item.created_at}
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 545b92fe1..1ba951203 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -201,6 +201,7 @@ function CoderDepot(props){ setLastCommit(c && c.commit); setLastCommitAuthor(c && c.committer); setMainFlag(false); + setReadme(result.data.readme) setReadOnly(true); setReadOnly(!editReadme); setHide(true); diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 7ab02ac42..d5c2593e9 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -6,29 +6,21 @@ import { Link } from 'react-router-dom'; import { truncateCommitId } from '../../common/util'; import './Index.scss'; import Tree from '../img/tree.png' -import Pagination from 'rc-pagination'; +import moment from 'moment'; -const limit = 15; function Tags(props) { - const [ source , setSource ] = useState([]); - const [ total ,setTotal ] = useState(0); - const [ page , setPage ] = useState(1); + const [ source , setSource ] = useState([]); const { projectsId , owner } = props.match.params; useEffect(() => { if (projectsId) { const url = `/${owner}/${projectsId}/tags.json`; - axios.get(url,{ - // params:{ - // limit - // } - }).then((result) => { + axios.get(url).then((result) => { if (result) { setSource(result.data); - setTotal(result.data.total_count); } }).catch(error => {}) } @@ -53,7 +45,7 @@ function Tags(props) { return ( {item.commit && item.commit.name} - 创建于{item.commit && item.commit.time} + 创建于{item.commit && item.commit.time_ago} ) } @@ -65,7 +57,7 @@ function Tags(props) { ellipsis:true, render:(txt,item)=>{ return ( -
{/* 发行版附件下载 */}
{item.attachments && item.attachments.map((item)=>{
- return(下载 {item.title})
+ return(下载 {item.title})
})}
{/* 发行版下载包 */}
下载 {item.tag_name}.TAR.gz
@@ -112,7 +113,7 @@ function version(props) {
return (