diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css
index ecce221de..a3a86a8ee 100644
--- a/public/css/edu-purge.css
+++ b/public/css/edu-purge.css
@@ -1520,7 +1520,15 @@ a.edu-txt-w80,
.font-16 {
font-size: 16px !important;
}
-
+.weight400{
+ font-weight: 400;
+}
+.weight500{
+ font-weight: 500;
+}
+.weight{
+ font-weight: bold;
+}
.font-17 {
font-size: 17px !important;
}
@@ -1540,6 +1548,9 @@ a.edu-txt-w80,
.font-25 {
font-size: 25px !important;
}
+.font-26 {
+ font-size: 26px !important;
+}
.font-24 {
font-size: 24px !important;
@@ -1561,6 +1572,9 @@ a.edu-txt-w80,
font-size: 36px !important;
}
+.font-40 {
+ font-size: 40px !important;
+}
.font-50 {
font-size: 50px !important;
}
diff --git a/public/css/iconfont.css b/public/css/iconfont.css
index 4498c693a..1b6e09a20 100644
--- a/public/css/iconfont.css
+++ b/public/css/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
- src: url('iconfont.woff2?t=1630632852475') format('woff2'),
- url('iconfont.woff?t=1630632852475') format('woff'),
- url('iconfont.ttf?t=1630632852475') format('truetype');
+ src: url('iconfont.woff2?t=1631692103587') format('woff2'),
+ url('iconfont.woff?t=1631692103587') format('woff'),
+ url('iconfont.ttf?t=1631692103587') format('truetype');
}
.iconfont {
@@ -13,6 +13,54 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-icon:before {
+ content: "\e8ce";
+}
+
+.icon-tar:before {
+ content: "\e8cf";
+}
+
+.icon-a-fuzhi2:before {
+ content: "\e8d0";
+}
+
+.icon-fujian1:before {
+ content: "\e8d1";
+}
+
+.icon-a-bianji1:before {
+ content: "\e8d2";
+}
+
+.icon-banbenicon:before {
+ content: "\e8d3";
+}
+
+.icon-shanchuicon2:before {
+ content: "\e8d4";
+}
+
+.icon-a-lajitong_icon3x:before {
+ content: "\e8d5";
+}
+
+.icon-xialaanniu2:before {
+ content: "\e8d6";
+}
+
+.icon-xiazai-icon:before {
+ content: "\e8d7";
+}
+
+.icon-master_icon1:before {
+ content: "\e8d8";
+}
+
+.icon-shangchuanicon:before {
+ content: "\e8d9";
+}
+
.icon-gerenziliao1:before {
content: "\e8c7";
}
diff --git a/public/css/iconfont.js b/public/css/iconfont.js
index e50f44e1a..fdaa5e328 100644
--- a/public/css/iconfont.js
+++ b/public/css/iconfont.js
@@ -1 +1 @@
-!function(c){var l,a,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
+!function(c){var a,l,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,a){a.parentNode.insertBefore(c,a)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}a=function(){var c,a;(a=document.createElement("div")).innerHTML=z,z=null,(c=a.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",a=c,(c=document.body).firstChild?p(a,c.firstChild):c.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),a()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(h=a,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
\ No newline at end of file
diff --git a/public/css/iconfont.json b/public/css/iconfont.json
index e78a264c5..eb088c35c 100644
--- a/public/css/iconfont.json
+++ b/public/css/iconfont.json
@@ -5,6 +5,90 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "24368060",
+ "name": "icon",
+ "font_class": "icon",
+ "unicode": "e8ce",
+ "unicode_decimal": 59598
+ },
+ {
+ "icon_id": "24368061",
+ "name": "tar",
+ "font_class": "tar",
+ "unicode": "e8cf",
+ "unicode_decimal": 59599
+ },
+ {
+ "icon_id": "24289113",
+ "name": "复制 (2)",
+ "font_class": "a-fuzhi2",
+ "unicode": "e8d0",
+ "unicode_decimal": 59600
+ },
+ {
+ "icon_id": "24289114",
+ "name": "附件",
+ "font_class": "fujian1",
+ "unicode": "e8d1",
+ "unicode_decimal": 59601
+ },
+ {
+ "icon_id": "24289115",
+ "name": "编 辑",
+ "font_class": "a-bianji1",
+ "unicode": "e8d2",
+ "unicode_decimal": 59602
+ },
+ {
+ "icon_id": "24289116",
+ "name": "版本icon",
+ "font_class": "banbenicon",
+ "unicode": "e8d3",
+ "unicode_decimal": 59603
+ },
+ {
+ "icon_id": "24289117",
+ "name": "删除icon",
+ "font_class": "shanchuicon2",
+ "unicode": "e8d4",
+ "unicode_decimal": 59604
+ },
+ {
+ "icon_id": "24289118",
+ "name": "垃圾桶_icon@3x",
+ "font_class": "a-lajitong_icon3x",
+ "unicode": "e8d5",
+ "unicode_decimal": 59605
+ },
+ {
+ "icon_id": "24289119",
+ "name": "下拉按钮",
+ "font_class": "xialaanniu2",
+ "unicode": "e8d6",
+ "unicode_decimal": 59606
+ },
+ {
+ "icon_id": "24289120",
+ "name": "下载-icon",
+ "font_class": "xiazai-icon",
+ "unicode": "e8d7",
+ "unicode_decimal": 59607
+ },
+ {
+ "icon_id": "24289121",
+ "name": "master_icon",
+ "font_class": "master_icon1",
+ "unicode": "e8d8",
+ "unicode_decimal": 59608
+ },
+ {
+ "icon_id": "24289122",
+ "name": "上传icon",
+ "font_class": "shangchuanicon",
+ "unicode": "e8d9",
+ "unicode_decimal": 59609
+ },
{
"icon_id": "24059956",
"name": "个人资料",
diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf
index a0b8934f1..d77665009 100644
Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ
diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff
index 98e387c01..a9ab654fb 100644
Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ
diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2
index eb219c96e..4f43fc559 100644
Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ
diff --git a/src/common/TextUtil.js b/src/common/TextUtil.js
index 94e736314..d1aa0e9cd 100644
--- a/src/common/TextUtil.js
+++ b/src/common/TextUtil.js
@@ -69,7 +69,7 @@ export function appendFileSizeToUploadFile(item) {
}
export function appendFileSizeToUploadFileAll(fileList) {
return fileList.map(item => {
- if (item.name.indexOf(uploadNameSizeSeperator) == -1) {
+ if (item.name.indexOf(uploadNameSizeSeperator) === -1) {
return Object.assign({}, item, { name: `${item.name}${uploadNameSizeSeperator}${bytesToSize(item.size)}` })
}
return item
diff --git a/src/forge/Branch/Select.jsx b/src/forge/Branch/Select.jsx
index 073658d93..601b94e8b 100644
--- a/src/forge/Branch/Select.jsx
+++ b/src/forge/Branch/Select.jsx
@@ -26,7 +26,7 @@ export default (({ projectsId , branch , owner , changeBranch , branchList , tag
{/* {nav === 0 ?"分支":"标签"} */}
-
+
{showValue}
diff --git a/src/forge/Branch/SelectOverlay.jsx b/src/forge/Branch/SelectOverlay.jsx
index d536d1c99..bb1774daa 100644
--- a/src/forge/Branch/SelectOverlay.jsx
+++ b/src/forge/Branch/SelectOverlay.jsx
@@ -55,7 +55,7 @@ function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owne
}
- placeholder="请输入分支或标签名称搜索"
+ placeholder={`请输入分支${tagflag ? "或标签" :""}名称搜索`}
autocomplete="off" className="OptionsInput"
value={inputValue}
onChange={changeInputValue}
diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js
deleted file mode 100644
index 4982414a2..000000000
--- a/src/forge/Main/CoderRootBranch.js
+++ /dev/null
@@ -1,92 +0,0 @@
-import React , { useState, useEffect } from 'react';
-import { Link } from "react-router-dom";
-import { Dropdown , Menu , Icon , Tooltip , Spin } from 'antd';
-import { truncateCommitId } from '../common/util';
-import { getBranch } from '../GetData/getData';
-import Nodata from '../Nodata';
-import './list.scss';
-
-function turnbar(str){
- if(str && str.length>0 && str.indexOf("/")>-1){
- return str.replaceAll('/','%2F');
- }
- return str;
-}
-export default ((props)=>{
- const [ data , setData ] =useState(undefined);
- const [ isSpin , setIsSpin ] =useState(true);
-
- const { projectsId , owner } = props.match.params;
- const { isManager , isDeveloper , projectDetail } = props;
- useEffect(()=>{
- getBranchs(projectsId, owner);
- },[projectsId])
-
- async function getBranchs(id,owner){
- let result = await getBranch(id,owner);
- setData(result);
- setIsSpin(false);
- }
-
- const list =()=>{
- if(data && data.length>0){
- return(
-
-
- {
- data.map((item,key)=>{
- return(
- -
-
-
{item.name}
-
- {item.last_commit && truncateCommitId(item.last_commit.sha)}
- {item.last_commit && item.last_commit.message}
- 最后更新于{item.last_commit && item.last_commit.time_from_now}
-
-
-
- {
- (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
- 创建合并请求
- }
-
-
-
-
-
-
-
- )
- })
- }
-
-
- )
- }else if(data && data.length === 0){
- return (
)
- }
- }
- const menu =(zip_url,tar_url)=> (
-
- )
-
- return(
-
-
-
- )
-})
-
-
-
diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js
index 0fb30c4e1..b5d241968 100644
--- a/src/forge/Main/CoderRootIndex.js
+++ b/src/forge/Main/CoderRootIndex.js
@@ -1,9 +1,10 @@
import React , { Component } from 'react';
import { Route , Switch } from 'react-router-dom';
-import Top from './DetailTop';
+// import Top from './DetailTop';
import Loadable from 'react-loadable';
import Loading from '../../Loading';
import axios from 'axios';
+import './Index.scss';
const FileNew = Loadable({
loader: () => import('../Newfile/Index'),
@@ -18,25 +19,25 @@ const CoderRootCommit = Loadable({
loading: Loading,
})
const CoderRootBranch = Loadable({
- loader: () => import('./CoderRootBranch'),
+ loader: () => import('./tree/Index'),
loading: Loading,
})
const CoderRootTag = Loadable({
- loader: () => import('./CoderRootTag'),
+ loader: () => import('./tag/Index'),
loading: Loading,
})
const CoderRootVersion = Loadable({
- loader: () => import('../Version/version'),
- loading: Loading,
-})
-const CoderRootVersionNew = Loadable({
- loader: () => import('../Version/New'),
- loading: Loading,
-})
-const CoderRootVersionUpdate = Loadable({
- loader: () => import('../Version/New'),
+ loader: () => import('./version/Index'),
loading: Loading,
})
+// const CoderRootVersionNew = Loadable({
+// loader: () => import('./version/New'),
+// loading: Loading,
+// })
+// const CoderRootVersionUpdate = Loadable({
+// loader: () => import('./version/New'),
+// loading: Loading,
+// })
const Diff = Loadable({
loader: () => import('./Diff'),
loading: Loading,
@@ -83,8 +84,8 @@ class CoderRootIndex extends Component{
}
render(){
return(
-
-
+
+ {/*
*/}
{/* 新建文件 */}
()
}
>
- ()
}
@@ -126,7 +127,7 @@ class CoderRootIndex extends Component{
render={
() => ()
}
- >
+ > */}
()
diff --git a/src/forge/Main/CoderRootTag.js b/src/forge/Main/CoderRootTag.js
deleted file mode 100644
index da1fa96d1..000000000
--- a/src/forge/Main/CoderRootTag.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import React, { useState, useEffect } from 'react';
-import axios from 'axios';
-import { Spin } from 'antd';
-import { truncateCommitId } from '../common/util';
-import Nodata from '../Nodata';
-import { Link } from 'react-router-dom'
-
-export default (( props, { projectDetail }) => {
- const [isSpin, setSpin] = useState(true);
- const [data, setData] = useState(undefined);
-
- const { projectsId , owner } = props.match.params;
-
- useEffect(() => {
- if (projectsId) {
- const url = `/${owner}/${projectsId}/tags.json`;
- axios.get(url).then((result) => {
- if (result) {
- setSpin(false);
- setData(result.data);
- }
- }).catch(error => {
- console.log(error);
- })
- }
- }, [owner, projectsId]);
-
- return (
-
-
-
- {
- data && data.length > 0 &&
-
-
-
- {
- data.map((item, key) => {
- return (
- -
-
-
- {item.name}
-
-
- {truncateCommitId(`${item.id}`)}
-
-
- TAR
- ZIP
-
-
- )
- })
- }
-
-
- }
- { data && data.length === 0 &&
}
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss
index 1158c38e6..6e7ae731b 100644
--- a/src/forge/Main/Index.scss
+++ b/src/forge/Main/Index.scss
@@ -447,4 +447,8 @@
.ant-anchor-ink::before{
background-color: #fff;
}
+}
+.coderSubPage{
+ width: 1200px;
+ margin:0px auto;
}
\ No newline at end of file
diff --git a/src/forge/Main/img/tree.png b/src/forge/Main/img/tree.png
new file mode 100644
index 000000000..56247256c
Binary files /dev/null and b/src/forge/Main/img/tree.png differ
diff --git a/src/forge/Main/sub/SubMenu.jsx b/src/forge/Main/sub/SubMenu.jsx
new file mode 100644
index 000000000..78f37b4de
--- /dev/null
+++ b/src/forge/Main/sub/SubMenu.jsx
@@ -0,0 +1,13 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import'./sub.scss'
+
+function SubMenu({tab,owner,projectsId}) {
+ return(
+
+ )
+}
+export default SubMenu;
\ No newline at end of file
diff --git a/src/forge/Main/sub/sub.scss b/src/forge/Main/sub/sub.scss
index 4e6a3d8ac..7716f0c50 100644
--- a/src/forge/Main/sub/sub.scss
+++ b/src/forge/Main/sub/sub.scss
@@ -64,4 +64,28 @@
background-color: #fff;
}
}
+}
+.subMenu{
+ display: flex;
+ padding-top: 30px;
+ a{
+ width: 83px;
+ font-weight: 500;
+ line-height: 30px;
+ height: 32px;
+ color: #333333!important;
+ text-align: center;
+ border: 1px solid #D0D0D0;
+ border-radius: 0px 4px 4px 0px;
+ background: rgba(250, 251, 252, 0);
+ &:first-child{
+ border-right: none;
+ border-radius: 4px 0px 0px 4px;
+ }
+ &.active{
+ background-color: #466AFF;
+ color: #fff!important;
+ border-color: #466AFF;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx
new file mode 100644
index 000000000..54586b144
--- /dev/null
+++ b/src/forge/Main/tag/Index.jsx
@@ -0,0 +1,103 @@
+import React,{ useEffect , useState } from 'react';
+import SubMenu from '../sub/SubMenu';
+import { Table , Tooltip } from 'antd';
+import axios from 'axios';
+import { Link } from 'react-router-dom';
+import { truncateCommitId } from '../../common/util';
+import './Index.scss';
+import Tree from '../img/tree.png'
+
+
+function Tags(props) {
+
+ const [ source , setSource ] = useState([]);
+
+ const { projectsId , owner } = props.match.params;
+
+ useEffect(() => {
+ if (projectsId) {
+ const url = `/${owner}/${projectsId}/tags.json`;
+ axios.get(url).then((result) => {
+ if (result) {
+ setSource(result.data);
+ }
+ }).catch(error => {})
+ }
+ }, [owner, projectsId]);
+
+ const columns=[
+ {
+ title:"标签名",
+ dataIndex:"name",
+ key:1,
+ ellipsis:true,
+ render:(txt,item)=>{
+ return {item.name}
+ }
+ },
+ {
+ title:"创建时间",
+ dataIndex:"time",
+ key:2,
+ ellipsis:true,
+ render:(txt,item)=>{
+ return (
+
+ {item.commit && item.commit.name}
+ 创建于{item.commit && item.commit.time}
+
+ )
+ }
+ },
+ {
+ title:"提交ID",
+ dataIndex:"id",
+ key:3,
+ ellipsis:true,
+ render:(txt,item)=>{
+ return (
+
+
+ {truncateCommitId(item.id)}
+
+ )
+ }
+ },
+ {
+ title:"描述信息",
+ dataIndex:"message",
+ key:4,
+ ellipsis:true,
+ render:(txt,item)=>{
+ return item.message || "--"
+ }
+ },
+ {
+ title:"下载",
+ dataIndex:"stage_type",
+ key:5,
+ ellipsis:true,
+ align:"center",
+ width:"181px",
+ render:(txt,item)=>{
+ return (
+
+
+ TAR
+
+
+ ZIP
+
+
+ )
+ }
+ }
+ ]
+ return(
+
+ )
+}
+export default Tags;
\ No newline at end of file
diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss
new file mode 100644
index 000000000..3bd487db6
--- /dev/null
+++ b/src/forge/Main/tag/Index.scss
@@ -0,0 +1,31 @@
+.tagTable{
+ margin-top: 30px;
+ thead{
+ tr th{
+ background-color: #fff;
+ padding:5px 0px;
+ .ant-table-column-title{
+ font-size: 16px;
+ font-weight: 500;
+ color: #333333;
+ }
+ }
+ }
+ tbody{
+ tr{
+ &:hover td{
+ background-color: #fff!important;
+ }
+ td{
+ padding:0px;
+ height: 69px;
+ line-height: 69px;
+ }
+ &:last-child{
+ td{
+ border-bottom: none!important;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx
new file mode 100644
index 000000000..3d532de5f
--- /dev/null
+++ b/src/forge/Main/tree/Index.jsx
@@ -0,0 +1,104 @@
+import React , { useEffect , useState } from 'react';
+import CopyTool from '../../Component/CopyTool';
+import { truncateCommitId } from '../../common/util';
+import { Link } from 'react-router-dom';
+import { getImageUrl } from 'educoder';
+import { Dropdown , Menu , Spin } from 'antd';
+import './Index.scss';
+
+import Tree from '../img/tree.png';
+import Axios from 'axios';
+
+function turnbar(str){
+ if(str && str.length>0 && str.indexOf("/")>-1){
+ return str.replaceAll('/','%2F');
+ }
+ return str;
+}
+function Index(props) {
+ const [ list , setList ] = useState([]);
+ const [ isSpin , setIsSpin ] = useState(true);
+
+ const { projectsId , owner } = props.match.params;
+ const { isManager , isDeveloper , projectDetail } = props;
+
+ useEffect(()=>{
+ getList();
+ },[])
+
+
+ const menu =(zip_url,tar_url)=> (
+
+ )
+
+ function getList() {
+ const url = `/${owner}/${projectsId}/branches_slice.json`;
+ Axios.get(url).then(result=>{
+ if(result){
+ setList(result.data);
+ }
+ setIsSpin(false);
+ }).catch(error=>{setIsSpin(false);})
+ }
+
+ return(
+
+
+ {
+ list && list.length>0 && list.map((item,key)=>{
+ return(
+
+ {item.branch_type === "default" ? "默认分支" : item.branch_type==="protected"?"保护分支":"其它分支"}
+ {
+ item.list && item.list.length>0 &&
+
+ {
+ item.list.map((i,k)=>{
+ let last_commit = i.last_commit;
+ return(
+ -
+
+
{i.name}
+
+

+
{last_commit && last_commit.committer && last_commit.committer.name}
+
更新于{last_commit && last_commit.time_from_now}
+
+
+
+
+ {
+ (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
+
+ 合并请求
+ }
+
+ 下载
+
+
+
+ )
+ })
+ }
+
+ }
+
+ )
+ })
+ }
+
+
+ )
+}
+export default Index;
\ No newline at end of file
diff --git a/src/forge/Main/tree/Index.scss b/src/forge/Main/tree/Index.scss
new file mode 100644
index 000000000..964fee19e
--- /dev/null
+++ b/src/forge/Main/tree/Index.scss
@@ -0,0 +1,81 @@
+.branchSort{
+ font-weight: 500;
+ color: #333333;
+ font-size: 15px;
+ height: 20px;
+ line-height: 20px;
+ padding-left: 10px;
+ margin-top: 20px;
+ margin-bottom: 6px!important;
+}
+.treeUl{
+ background: #FAFCFF;
+ border-radius: 4px;
+ border: 1px solid rgba(42, 97, 255, 0.23);
+ li{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 12px 20px;
+ border-bottom: 1px solid rgba(42, 97, 255, 0.23);
+ &:last-child{
+ border-bottom: none;
+ }
+ .treeinfo{
+ max-width: 399px;
+ flex:1;
+ flex-direction: column;
+ a:hover{
+ text-decoration: underline;
+ }
+ img{
+ height: 20px;
+ width: 20px;
+ margin-right: 5px;
+ }
+ }
+ .treecopy{
+ flex:1;
+ display: flex;
+ justify-content: center;
+ &>div{
+ height: 32px;
+ background: #FAFBFC;
+ border-radius: 4px;
+ border: 1px solid #D0D0D0;
+ position: relative;
+ z-index: 1;
+ display: flex;
+ align-items: center;
+ &>span{
+ padding:0px 15px;
+ border-right: 1px solid rgba(153, 153, 153, 0.4);
+ height: 100%;
+ img{
+ margin-right: 4px;
+ }
+ a{
+ color: #466AFF;
+ &:hover{
+ text-decoration: underline;
+ }
+ }
+ }
+ &>i{
+ margin:0px 12px;
+ color: #333!important;
+ }
+ input{
+ position: absolute;
+ z-index: 0;
+ opacity: 0;
+ top: 32px;
+ }
+ }
+ }
+ .treeabout{
+ flex:1;
+ text-align: right;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/forge/Main/version/Empty.jsx b/src/forge/Main/version/Empty.jsx
new file mode 100644
index 000000000..5dac793ec
--- /dev/null
+++ b/src/forge/Main/version/Empty.jsx
@@ -0,0 +1,22 @@
+import { Button } from 'antd';
+import React from 'react';
+import './version.scss';
+
+function Empty({operation,addFunc}) {
+ return(
+
+
+
这里暂未发布过任何版本
+
发行版功能基于仓库中的历史标记
建议使用类似 V1.0 的版本标记作为发布点
+
+ {
+ operation ?
+
+ :
+ 该项目暂时没有发布版本
+ }
+
+
+ )
+}
+export default Empty;
\ No newline at end of file
diff --git a/src/forge/Main/version/Index.jsx b/src/forge/Main/version/Index.jsx
new file mode 100644
index 000000000..37cc8c128
--- /dev/null
+++ b/src/forge/Main/version/Index.jsx
@@ -0,0 +1,41 @@
+import React from 'react';
+import { Switch , Route } from 'react-router';
+import Loadable from 'react-loadable';
+import Loading from '../../../Loading';
+import SubMenu from '../sub/SubMenu';
+import "./version.scss";
+
+const CoderRootVersion = Loadable({
+ loader: () => import('./version'),
+ loading: Loading,
+})
+const CoderRootVersionNew = Loadable({
+ loader: () => import('./New'),
+ loading: Loading,
+})
+function Index(props) {
+ const { projectsId , owner } = props.match.params;
+ return(
+
+
+
+ ()
+ }
+ >
+ ()
+ }
+ >
+ ()
+ }
+ >
+
+
+ )
+}
+export default Index;
\ No newline at end of file
diff --git a/src/forge/Main/version/New.jsx b/src/forge/Main/version/New.jsx
new file mode 100644
index 000000000..6b1dc2489
--- /dev/null
+++ b/src/forge/Main/version/New.jsx
@@ -0,0 +1,253 @@
+import React, { useState, useEffect, forwardRef } from "react";
+import styled from "styled-components";
+import { AutoComplete , Input, Checkbox, Button, Form } from "antd";
+import SelectBranch from '../../Branch/Select';
+
+import Editor from "../../../modules/tpm/challengesnew/tpm-md-editor";
+import Upload from "../../Upload/Index";
+import Attachments from "../../Upload/attachment";
+import axios from "axios";
+import "./version.scss";
+
+const { Option } = AutoComplete;
+
+const Span = styled.span`
+ margin: 0px 15px;
+ color: #bbb;
+ line-height: 35px;
+ font-size:16px;
+ font-weight:400;
+ color:#666;
+`;
+export default Form.create()(
+ forwardRef(
+ (
+ { form, projectDetail , match, showNotification, history },
+ ref
+ ) => {
+ const { getFieldDecorator, validateFields, setFieldsValue } = form;
+ const [tagList, setTagList] = useState(undefined);
+ const [desc, setDesc] = useState(null);
+ const [branch, setBranch ] = useState(null);
+ const [fileList, setFileList] = useState(undefined);
+ const [attachment, setAttachment] = useState(undefined);
+ const [options , setOptions] = useState(undefined);
+
+ const { projectsId, versionId , owner } = match.params;
+
+ useEffect(()=>{
+ if(projectDetail && projectDetail.default_branch){
+ setBranch(projectDetail.default_branch);
+ }
+ },[projectDetail])
+
+
+ useEffect(() => {
+ if (versionId) {
+ const url = `/${owner}/${projectsId}/releases/${versionId}/edit.json`;
+ axios.get(url).then(result => {
+ if (result) {
+ setFieldsValue(result.data);
+ setDesc(result.data.body);
+ setAttachment(result.data.attachments);
+ }
+ });
+ }
+ }, [versionId]);
+
+ useEffect(() => {
+ if (projectsId) {
+ const url = `/${owner}/${projectsId}/tags.json`;
+ axios
+ .get(url,{params:{
+ limit:1000
+ }})
+ .then(result => {
+ if (result) {
+ setTagList(result.data);
+ setOptions(renderTagList(result.data));
+ }
+ })
+ .catch(error => {
+ console.log(error);
+ });
+ }
+ }, [projectsId]);
+
+ function renderTagList(list) {
+ if (list) {
+ let array = list.map((item, key) => {
+ return (
+
+ );
+ });
+ return array || undefined;
+ }
+ }
+ function submit() {
+ validateFields((err, value) => {
+ if(err)return;
+ if (versionId) {
+ let url = `/${owner}/${projectsId}/releases/${versionId}.json`;
+ axios
+ .put(url, {
+ ...value,
+ body: desc,
+ attachment_ids: fileList,
+ target_commitish:branch
+ })
+ .then(result => {
+ if (result) {
+ showNotification("版本修改成功!");
+ history.push(`/${owner}/${projectsId}/releases`);
+ }
+ });
+ } else {
+ let url = `/${owner}/${projectsId}/releases.json`;
+ axios.post(url, {
+ ...value,
+ body: desc,
+ attachment_ids: fileList
+ })
+ .then(result => {
+ if (result) {
+ showNotification("版本发布成功!");
+ history.push(`/${owner}/${projectsId}/releases`);
+ }
+ });
+ }
+ });
+ }
+ // 输入标签名
+ function changeAuto(value){
+ let l = tagList.filter(item=>item.name.indexOf(value) > -1);
+ setOptions(renderTagList(l));
+ }
+
+ function changeBranch(params) {
+ setBranch(params);
+ }
+ return (
+
+
+ {getFieldDecorator("name",
+ { rules:[
+ { required: true, message: "请输入发行版的标题" }
+ ],
+ validateFirst: true
+ })(
+
+ )}
+
+
+
+
+
+ }
+ size={100}
+ showNotification={showNotification}
+ />
+ {versionId && attachment && attachment.length > 0 ? (
+
+ ) : (
+ ""
+ )}
+
+
+ {getFieldDecorator("prerelease",
+ { rules:[],
+ validateFirst: true
+ })(
+ 这是一个预览版本
+ )}
+
+
+
+
+
+
+
+
+
标签命名建议
+
+ 通常的做法是在版本名称前加上字母 v 前缀, v1.0 或者 v2.3.4。
+
+
+ 如果标签不适合在生产环境下使用,请在版本名称后添加预发行版本。例如:v0.2-alpha
+ 或者 v5.9-beta.3。
+
+
+
+
语义化版本
+
+ 如果你是第一次发布版本,我们强烈建议你阅读语义化版本。
+
+
+
+
附件大小说明
+
+ 单个附件不能超过 100M(GVP 项目200M),每个仓库总附件不可超过
+ 1G(推荐项目不可超过 5G;GVP 项目不可超过
+ 20G)。附件总容量统计包括仓库附件和发行版附件。
+
+
+
+
+ );
+ }
+ )
+);
diff --git a/src/forge/Main/version/version.js b/src/forge/Main/version/version.js
new file mode 100644
index 000000000..9feec8894
--- /dev/null
+++ b/src/forge/Main/version/version.js
@@ -0,0 +1,122 @@
+import React, { useEffect , useState } from "react";
+import { Link } from 'react-router-dom';
+import { Spin , Button } from 'antd';
+import { getImageUrl } from 'educoder';
+import Empty from './Empty';
+import './version.scss';
+import axios from 'axios';
+import RenderHtml from '../../../components/render-html';
+
+function version(props) {
+ const [ data , setData ] = useState(undefined);
+ const [ releases , setReleases ] = useState(undefined);
+ const [ isSpin , setIsSpin ] = useState(true);
+ const { projectsId ,owner } = props.match.params;
+ const { isManager , isDeveloper } = props;
+ const type = props.projectDetail && props.projectDetail.type;
+
+ useEffect(()=>{
+ getIssueList();
+ },[])
+ // 获取列表数据
+ function getIssueList(){
+ const url = `/${owner}/${projectsId}/releases.json`;
+ axios.get(url).then((result) => {
+ if (result) {
+ setData(result.data);
+ setReleases(result.data.releases);
+ setIsSpin(false);
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+
+ // 显示版本描述
+ function showBody(key,flag){
+ var lists = releases.concat();
+ lists[key].bodyshow = !flag ? true : false;
+ lists.splice();
+ setReleases(lists);
+ }
+
+ function renderList(releases){
+ if (releases && releases.length > 0) {
+ return (
+
+ {
+ data && data.user_permission && type !== 2 &&
+
+
+
+ }
+
+ {
+ releases.map((item, key) => {
+ return (
+
+
+ {item.draft}
+
+
+ {item.tag_name}{item.draft === "预发行" ?"(standalone)":""}
+
+
+
+
+ 发布{item.name}{item.draft === "预发行" ?"(standalone)版本":""}
+ {
+ (isManager || isDeveloper) && type !==2 &&
+
+ }
+
+
+ showBody(key,item.bodyshow)}>
+
+ {item.user_name}
+ 发布于{item.created_at}
+
+ {
+ item.bodyshow &&
+
+
+
+ }
+
+
+ {item.tag_name}.TAR.gz
+ {item.tag_name}.ZIP
+
+
+
+ )
+ })
+ }
+
+
+ )
+ } else if (releases && releases.length === 0) {
+ return (
+
+ )
+ }
+ }
+
+ function addFunc(){
+ props.history.push(`/${owner}/${projectsId}/releases/new`);
+ }
+
+ return (
+
+
+
+ {renderList(releases)}
+
+
+
+ )
+}
+export default version;
\ No newline at end of file
diff --git a/src/forge/Main/version/version.scss b/src/forge/Main/version/version.scss
new file mode 100644
index 000000000..6f04e060d
--- /dev/null
+++ b/src/forge/Main/version/version.scss
@@ -0,0 +1,338 @@
+.topWrapper {
+ padding: 20px 0;
+ box-sizing: border-box;
+ display: flex;
+ justify-content: space-between;
+ border-bottom: 1px solid #EEEEEE;
+ align-items: center;
+}
+.topWrapper_btn_new {
+ background: #fff;
+ color: #5091FF!important;
+ padding:0px 12px;
+ text-align: center;
+ height: 32px;
+ line-height: 32px;
+ border-radius: 4px;
+ border:1px solid #5091FF;
+}
+.versionInfo{
+ display: flex;
+ width: 100%;
+}
+.versionInfo_left{
+ display: flex;
+ width: 182px;
+ flex-direction: column;
+ align-items: flex-end;
+ padding-right: 15px;
+}
+.versionInfo_right{
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ border-left: 1px solid #eee;
+ position: relative;
+ padding: 0px 30px 60px 24px;
+ &::before{
+ position: absolute;
+ left: -4px;
+ top:0px;
+ content: '';
+ width: 8px;
+ height: 8px;
+ background-color: #5091FF;
+ border-radius: 50%;
+ }
+ .sendAuthorImg{
+ width: 20px;
+ height: 20px;
+ border-radius: 50%;
+ margin-right: 5px;
+ }
+}
+.versionTag{
+ display: inline;
+ padding:0px 9px;
+ color: #fff;
+ position: relative;
+ margin-top: -8px;
+ height: 22px;
+ line-height: 20px;
+ border-radius: 4px;
+ &::before{
+ position: absolute;
+ content: "";
+ width: 0;
+ height: 0px;
+ border-left: 4px solid #cccccc;
+ border-top: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ border-right: 4px solid transparent;
+ z-index: 9;
+ top: 6px;
+ right: -9px;
+ }
+ &:after{
+ width: 0px;
+ height: 0px;
+ top:6px;
+ right: -7px;
+ position: absolute;
+ border-left:4px solid #fff;
+ border-top:4px solid transparent;
+ border-bottom:4px solid transparent;
+ border-right:4px solid transparent;
+ content:'';
+ z-index:10;
+ }
+}
+.versionFile{
+ margin-top: 5px;
+ padding-top: 20px;
+ border-top: 1px solid #eee;
+ width: 100%;
+ a{
+ display: block;
+ color: #333;
+ font-weight: 400;
+ height: 20px;
+ margin-bottom: 10px;
+ }
+}
+.versionTag.yellow{
+ border: 1px solid #FBBC06;
+ color: #FBBC06;
+ &::before{
+ border-left-color: #FBBC06;
+ }
+}
+.versionTag.green{
+ border: 1px solid #2DB44D;
+ color: #2DB44D;
+ &::before{
+ border-left-color: #2DB44D;
+ }
+}
+.versionTag.orange{
+ border: 1px solid #FF6E23;
+ color: #FF6E23;
+ &::before{
+ border-left-color: #FF6E23;
+ }
+}
+.addReleaseBtn{
+ text-align: right;
+ margin-bottom: 30px;
+}
+.versionName{
+ font-size: 16px;
+ color: #333;
+ margin-bottom: 15px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
+ height: 18px;
+ line-height: 18px;
+ margin-top: -5px;
+}
+
+
+.versionmilepostleft{
+ padding: 15px;
+ margin-right: 50px;
+ width: 80%;
+ }
+.topWrapper_btn_close {
+ background: #504b4b;
+ color: #FFFFFF!important;
+ padding:0px 12px;
+ text-align: center;
+ height: 32px;
+ line-height: 32px;
+ border-radius: 4px;
+ }
+
+ .topWrapper_btn_delete {
+ background: #da1010;
+ color: #FFFFFF!important;
+ padding:0px 12px;
+ text-align: center;
+ height: 32px;
+ line-height: 32px;
+ border-radius: 4px;
+ }
+
+ .versionrighe{
+ flex: 2;
+ }
+ .versionleft{
+ flex: 1;
+ text-align: right;
+ display: flex;
+ justify-content: right;
+ }
+
+ /* .version_line{
+ display: flex;
+ height: 30px;
+ margin: auto;
+ border-left:1px solid #eee;
+ } */
+ .version_line_one{
+ display: flex;
+ height: 45px;
+ margin: auto;
+ border-left:1px solid #eee;
+ }
+
+ .version_line_tpw{
+ display: flex;
+ height: 80px;
+ margin: auto;
+ border-left:1px solid #eee;
+ }
+
+ .versiondiv{
+ display: flex;
+ }
+ .verwinth{
+ width: 80%;
+ }
+
+ /*开启中 关闭中*/
+.opendversionetail{
+ display: inline-block;
+ background: #21ba45;
+ color: #ffffff!important;
+ padding:0px 5px;
+ text-align: center;
+ height: 25px;
+ /*width: 110px;*/
+ border-radius: 4px;
+ line-height: 25px;
+}
+.closedversionetail{
+ display: inline-block;
+ background: #e60b0b;
+ color: #ffffff!important;
+ padding:0px 5px;
+ text-align: center;
+ height: 25px;
+ /*width: 110px;*/
+ border-radius: 4px;
+ line-height: 25px;
+}
+.versionrectangle {
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ margin-top: 15px;
+ margin-left: -4px;
+ margin-bottom: 10px;
+ background: rgb(83, 81, 81);
+ }
+.ver-middle{
+ vertical-align: middle;
+}
+/* new */
+.versionForm{
+ flex:1;
+ padding-right: 40px;
+ box-sizing: border-box;
+}
+.versionTips{
+ width:268px;
+ box-sizing: border-box;
+}
+.infosTip{
+ border-bottom: 1px solid #EEEEEE;
+ color: #333;
+ padding-bottom: 26px;
+ margin-bottom: 26px;
+ font-weight: 400;
+ text-align: justify;
+ &:last-child{
+ border-bottom: none;
+ }
+}
+.dragBox{
+ background: rgba(153, 153, 153, 0.04);
+ border-radius: 4px;
+ border: 1px dashed #d9d9d9;
+ padding:20px;
+ .versionStyle{
+ border: none!important;
+ padding-bottom:20px;
+ .dragIcon{
+ font-size: 40px!important;
+ color: #666!important;
+ line-height: 40px;
+ height: 40px;
+ margin-bottom: 14px;
+ display: block;
+ }
+ }
+ .ant-upload-list-item:hover .ant-upload-list-item-info {
+ background-color: rgba(239, 244, 255, 1);
+ }
+ .ant-upload-list-item-info{
+ padding:0px 20px 0px 8px;
+ &>span{
+ display: flex;
+ align-items: center;
+ }
+ }
+}
+
+.set-ant-row .ant-row{
+ display: flex;
+ height: 20px;
+ align-items: center;
+}
+.itemInline{
+ display: flex;
+ align-items: flex-start;
+ position: relative;
+ &>p{
+ position: absolute;
+ bottom: 0px;
+ }
+}
+.itemInline .ant-row{
+ margin-bottom: 0px;
+}
+.prerelease{
+ padding-top: 20px;
+ .ant-form-item-control{
+ height: 20px;
+ line-height: 20px;
+ }
+}
+.releaseIndex{
+ margin: 30px auto;
+ width: 1200px;
+}
+.emptyPanel{
+ width: 100%;
+ background: #FAFCFF;
+ border-radius: 4px;
+ border: 1px solid rgba(42, 97, 255, 0.23);
+ min-height: 418px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ .operation{
+ width: 400px;
+ border-top: 1px solid #eee;
+ padding-top: 34px;
+ text-align: center;
+ margin-top: 30px;
+ }
+}
+.ant-form-item-control{
+ line-height: initial;
+}
\ No newline at end of file
diff --git a/src/forge/Newfile/index.css b/src/forge/Newfile/index.css
index 242fd4516..feb82b97a 100644
--- a/src/forge/Newfile/index.css
+++ b/src/forge/Newfile/index.css
@@ -39,7 +39,7 @@
z-index: 1;
}
.ant-input-group .ant-input:focus{
- border-right: 1px solid #d9d9d9!important;
+ border-right: 1px solid rgba(70, 106, 255, 1)!important;
}
.ant-btn-primary.grey{
border:1px solid #BBBBBB;
diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js
index 5b09ca071..1858e5fd1 100644
--- a/src/forge/Upload/Index.js
+++ b/src/forge/Upload/Index.js
@@ -1,7 +1,6 @@
import React, { Component } from "react";
import { Upload, Icon , Button } from 'antd';
import { getUploadActionUrl, appendFileSizeToUploadFileAll } from 'educoder';
-import { AlignCenter } from '../Component/layout';
import axios from 'axios';
const { Dragger } = Upload;
@@ -64,7 +63,6 @@ class Index extends Component {
changeIsComplete && changeIsComplete(true);
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
-
this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) });
this.fileIdList(fileList);
}
@@ -111,7 +109,7 @@ class Index extends Component {
:
{icon || }
- 拖动文件或点击此处上传
+ 拖动文件或点击此处上传
)
}
diff --git a/src/forge/Upload/untitled b/src/forge/Upload/untitled
deleted file mode 100644
index 2796e4d71..000000000
--- a/src/forge/Upload/untitled
+++ /dev/null
@@ -1,21 +0,0 @@
-
-1.请求URL: https://code.ihub.org.cn/api/v1/mirrors/create.json
-
-2.请求方式: POST
-
-3.参数:
-
-{
- "image_url": "xxx.git", #必填,且后缀必为.git,
- "language": "Ruby", #必填,如数据库不存在,则会创建新的记录
-}
-
-
-4. 返回值: {
- "status": 1,
- "message": "同步成功,项目ID===1806"
-}
-
-5. 返回值说明: 仅有当有返回值,且返回值的status 的值为1, 才是创建成功,其余均为创建失败
-
-
diff --git a/src/forge/Version/New.jsx b/src/forge/Version/New.jsx
deleted file mode 100644
index 0678a3457..000000000
--- a/src/forge/Version/New.jsx
+++ /dev/null
@@ -1,278 +0,0 @@
-import React, { useState, useEffect, useCallback, forwardRef } from "react";
-import styled from "styled-components";
-import { AutoComplete, Select, Input, Checkbox, Button, Form } from "antd";
-
-import Editor from "../../modules/tpm/challengesnew/tpm-md-editor";
-import Upload from "../Upload/Index";
-import Attachments from "../Upload/attachment";
-import axios from "axios";
-import "./version.css";
-import UploadImg from "../Images/upload.png";
-import { getBranch } from '../GetData/getData';
-
-const { Option } = AutoComplete;
-
-export default Form.create()(
- forwardRef(
- (
- { form, projectDetail , match, showNotification, history },
- ref
- ) => {
- const { getFieldDecorator, validateFields, setFieldsValue } = form;
- const [tagList, setTagList] = useState(undefined);
- const [branchList, setBranchList] = useState(undefined);
- const [desc, setDesc] = useState(null);
- const [fileList, setFileList] = useState(undefined);
- const [attachment, setAttachment] = useState(undefined);
- const [options , setOptions] = useState(undefined);
-
-
- const repo_id = projectDetail && projectDetail.repo_id;
- const { projectsId, versionId , owner } = match.params;
- useEffect(()=>{
- getBranchs(projectsId,owner);
- },[projectsId])
-
- async function getBranchs(id,owner){
- let result = await getBranch(id,owner);
- setBranchList(result);
- }
-
- const Span = styled.span`
- margin: 0px 15px;
- color: #bbb;
- line-height: 35px;
- `;
-
-
- useEffect(() => {
- if (versionId) {
- const url = `/${owner}/${projectsId}/releases/${versionId}/edit.json`;
- axios.get(url).then(result => {
- if (result) {
- setFieldsValue(result.data);
- setDesc(result.data.body);
- setAttachment(result.data.attachments);
- }
- });
- }
- }, [versionId]);
-
- useEffect(() => {
- if (projectsId) {
- const url = `/${owner}/${projectsId}/tags.json`;
- axios
- .get(url,{params:{
- limit:1000
- }})
- .then(result => {
- if (result) {
- setTagList(result.data);
- setOptions(renderTagList(result.data));
- }
- })
- .catch(error => {
- console.log(error);
- });
- }
- }, [projectsId]);
-
- function renderTagList(list) {
- if (list) {
- let array = list.map((item, key) => {
- return (
-
- );
- });
- return array || undefined;
- }
- }
- function submit() {
- validateFields((err, value) => {
- if(err)return;
- if (versionId) {
- let url = `/${owner}/${projectsId}/releases/${versionId}.json`;
- axios
- .put(url, {
- ...value,
- body: desc,
- attachment_ids: fileList
- })
- .then(result => {
- if (result) {
- showNotification("版本修改成功!");
- history.push(`/${owner}/${projectsId}/releases`);
- }
- });
- } else {
- let url = `/${owner}/${projectsId}/releases.json`;
- axios.post(url, {
- ...value,
- body: desc,
- attachment_ids: fileList
- })
- .then(result => {
- if (result) {
- showNotification("版本发布成功!");
- history.push(`/${owner}/${projectsId}/releases`);
- }
- });
- }
- });
- }
-
- const helper = useCallback(
- (label, name, rules, widget, isRequired = true) => (
-
- {label}
-
- {getFieldDecorator(name, { rules, validateFirst: true })(widget)}
-
-
- ),
- []
- );
- // 输入标签名
- function changeAuto(value){
- let l = tagList.filter(item=>item.name.indexOf(value) > -1);
- setOptions(renderTagList(l));
- }
- return (
-
-
-
-
-
标签命名建议
-
- 通常的做法是在版本名称前加上字母 v 前缀, v1.0 或者 v2.3.4。
-
-
- 如果标签不适合在生产环境下使用,请在版本名称后添加预发行版本。例如:v0.2-alpha
- 或者 v5.9-beta.3。
-
-
-
-
语义化版本
-
- 如果你是第一次发布版本,我们强烈建议你阅读语义化版本。
-
-
-
-
附件大小说明
-
- 单个附件不能超过 100M(GVP 项目200M),每个仓库总附件不可超过
- 1G(推荐项目不可超过 5G;GVP 项目不可超过
- 20G)。附件总容量统计包括仓库附件和发行版附件。
-
-
-
-
- );
- }
- )
-);
diff --git a/src/forge/Version/version.css b/src/forge/Version/version.css
deleted file mode 100644
index ddfbe7d64..000000000
--- a/src/forge/Version/version.css
+++ /dev/null
@@ -1,205 +0,0 @@
-.topWrapper {
- padding: 20px 0;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- border-bottom: 1px solid #EEEEEE;
- align-items: center;
-}
-.topWrapper_btn_new {
- background: #fff;
- color: #5091FF!important;
- padding:0px 12px;
- text-align: center;
- height: 32px;
- line-height: 32px;
- border-radius: 4px;
- border:1px solid #5091FF;
-}
-.versionInfo{
- display: flex;
- width: 100%;
-}
-.versionInfo_left{
- display: flex;
- width: 30%;
- padding-top: 20px;
- flex-direction: column;
- align-items: flex-end;
- padding-right: 15px;
-}
-.versionInfo_right{
- flex: 1;
- padding: 20px 0px 20px 15px;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- border-left: 1px solid #eee;
-}
-.versionTag{
- display: inline;
- border-radius: 2px;
- padding:2px 12px;
- font-size: 12px;
- color: #fff;
-}
-.versionTag.yellow{
- background-color: #FBBC06;
-}
-.versionTag.green{
- background-color: #20BA45;
-}
-.versionTag.orange{
- background-color: #F2711D;
-}
-.versionName{
- font-size: 16px;
- color: #333;
- margin-bottom: 10px;
- display: flex;
- align-items: flex-end;
- position: relative;
-}
-.versionName::before{
- position: absolute;
- left: -19px;
- top:8px;
- content: '';
- width: 8px;
- height: 8px;
- background-color: #5091FF;
- border-radius: 50%;
-}
-
-
-.versionmilepostleft{
- padding: 15px;
- margin-right: 50px;
- width: 80%;
- }
-.topWrapper_btn_close {
- background: #504b4b;
- color: #FFFFFF!important;
- padding:0px 12px;
- text-align: center;
- height: 32px;
- line-height: 32px;
- border-radius: 4px;
- }
-
- .topWrapper_btn_delete {
- background: #da1010;
- color: #FFFFFF!important;
- padding:0px 12px;
- text-align: center;
- height: 32px;
- line-height: 32px;
- border-radius: 4px;
- }
-
- .versionrighe{
- flex: 2;
- }
- .versionleft{
- flex: 1;
- text-align: right;
- display: flex;
- justify-content: right;
- }
-
- /* .version_line{
- display: flex;
- height: 30px;
- margin: auto;
- border-left:1px solid #eee;
- } */
- .version_line_one{
- display: flex;
- height: 45px;
- margin: auto;
- border-left:1px solid #eee;
- }
-
- .version_line_tpw{
- display: flex;
- height: 80px;
- margin: auto;
- border-left:1px solid #eee;
- }
-
- .versiondiv{
- display: flex;
- }
- .verwinth{
- width: 80%;
- }
-
- /*开启中 关闭中*/
-.opendversionetail{
- display: inline-block;
- background: #21ba45;
- color: #ffffff!important;
- padding:0px 5px;
- text-align: center;
- height: 25px;
- /*width: 110px;*/
- border-radius: 4px;
- line-height: 25px;
-}
-.closedversionetail{
- display: inline-block;
- background: #e60b0b;
- color: #ffffff!important;
- padding:0px 5px;
- text-align: center;
- height: 25px;
- /*width: 110px;*/
- border-radius: 4px;
- line-height: 25px;
-}
-.versionrectangle {
- width: 8px;
- height: 8px;
- border-radius: 100%;
- margin-top: 15px;
- margin-left: -4px;
- margin-bottom: 10px;
- background: rgb(83, 81, 81);
- }
-.ver-middle{
- vertical-align: middle;
-}
-/* new */
-.versionForm{
- flex:1;
- padding-right: 30px;
- box-sizing: border-box;
-}
-.versionTips{
- width:30%;
- padding-left: 15px;
- box-sizing: border-box;
-}
-.infosTip{
- padding:20px;
- background-color: #F1F8FF;
- margin-bottom: 22px;
- color: #333;
-}
-.versionStyle{
- height: 200px!important;
- border: 1px dashed rgba(80,145,255,1)!important;
-}
-.set-ant-row .ant-row{
- display: flex;
- height: 20px;
- align-items: center;
-}
-.itemInline{
- display: flex;
- align-item: center;
- margin-bottom: 5px;
-}
-.itemInline .ant-row{
- margin-bottom: 0px;
-}
\ No newline at end of file
diff --git a/src/forge/Version/version.js b/src/forge/Version/version.js
deleted file mode 100644
index 5049b31d9..000000000
--- a/src/forge/Version/version.js
+++ /dev/null
@@ -1,128 +0,0 @@
-import React, { Component } from "react";
-import { Link } from 'react-router-dom';
-import { Spin } from 'antd';
-import NoneData from '../Nodata';
-import './version.css';
-import axios from 'axios';
-import RenderHtml from '../../components/render-html';
-
-/**
- * issue_chosen:下拉的筛选列表,
- * data:列表接口返回的所有数据,
- * issues:列表数组,
- * isSpin:加载中,
- */
-class version extends Component {
- constructor(props) {
- super(props);
- this.state = {
- issue_chosen: undefined,
- data: undefined,
- releases:undefined,
- issues: undefined,
- isSpin: true,
- search: undefined,
- search_count: undefined,
- }
- }
-
- componentDidMount = () => {
- this.getIssueList();
- }
- // 获取列表数据
- getIssueList = () => {
- const { projectsId, owner } = this.props.match.params;
- const url = `/${owner}/${projectsId}/releases.json`;
- axios.get(url).then((result) => {
- if (result) {
- this.setState({
- data: result.data,
- releases:result.data.releases,
- issues: result.data.issues,
- isSpin: false
- })
- }
- }).catch((error) => {
- console.log(error);
- })
- }
-
- // 显示版本描述
- showBody=(key,flag)=>{
- let { releases } = this.state;
- releases[key].bodyshow = !flag;
- this.setState({
- releases
- })
- }
-
- renderList = (releases) => {
- const { projectsId , owner } = this.props.match.params;
- const { isManager , isDeveloper } = this.props;
- const type = this.props.projectDetail && this.props.projectDetail.type;
-
- if (releases && releases.length > 0) {
- return (
- releases.map((item, key) => {
- return (
-
-
- {item.draft}
- {item.created_at}
-
-
- {item.tag_name}
-
-
-
-
- {item.name}
- {
- (isManager || isDeveloper) && type !==2 &&
- (编辑)
- }
-
-
- this.showBody(key,item.bodyshow)}>
- {item.user_name}:发布了这个版本,并在发布后提交给{item.target_commitish}
-
- {
- item.bodyshow &&
- }
-
-
- TAR
- ZIP
-
-
-
- )
- })
- )
- } else if (releases && releases.length === 0) {
- return ( )
- }
- }
-
- render() {
- const { projectsId ,owner } = this.props.match.params;
- const { data , releases , isSpin } = this.state;
- const type = this.props.projectDetail && this.props.projectDetail.type;
- return (
-
-
- 版本发布
- {
- data && data.user_permission && type !== 2 ?
- + 发布新版
- : ''
- }
-
-
-
{this.renderList(releases)}
-
-
- )
- }
-}
-export default version;
\ No newline at end of file
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss
index d9a5b071c..03bbbc42e 100644
--- a/src/forge/css/index.scss
+++ b/src/forge/css/index.scss
@@ -143,7 +143,7 @@ form.ant-form{
}
form{
.ant-row.ant-form-item{
- margin-bottom: 15px;
+ margin-bottom: 20px;
}
}
@media screen and (max-width: 1000px){
@@ -285,4 +285,29 @@ form{
border-bottom: none;
}
}
+}
+.btn-83{
+ width: 83px;
+ height: 32px;
+ line-height: 30px;
+ text-align: center;
+ background: #FAFBFC;
+ border: 1px solid #D0D0D0;
+ display: inline-block;
+ border-radius: 5px;
+ font-weight: 500;
+ color: #333333!important;
+ &:hover,&:active{
+ background: #F3F4F6;
+ color: #333333!important;
+ }
+}
+a.hover:hover{
+ text-decoration: underline;
+}
+button.ant-btn-primary.btnblue{
+ background-color:rgba(70, 106, 255, 1);
+ &:hover{
+ background-color:rgba(70, 106, 255, 0.85);
+ }
}
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
index e58df61f0..4c75d804f 100644
--- a/src/index.css
+++ b/src/index.css
@@ -30,11 +30,11 @@
.ant-upload-list-item-info .anticon-loading,
.ant-upload-list-item-info .anticon-paper-clip {
- color: #29bd8b !important;
+ color: rgba(102, 102, 102, 1) !important;
}
.anticon anticon-paper-clip {
- color: #29bd8b !important;
+ color: rgba(102, 102, 102, 1) !important;
}
.MuiModal-root-15 {
diff --git a/src/modules/courses/css/Courses.css b/src/modules/courses/css/Courses.css
index 73d320ed7..cf5f1783e 100644
--- a/src/modules/courses/css/Courses.css
+++ b/src/modules/courses/css/Courses.css
@@ -938,7 +938,7 @@ body #root {
}
.ant-input:focus {
- border: 1px solid #d9d9d9 !important;
+ border: 1px solid rgba(70, 106, 255, 1) !important;
}
/* 公用的文字按钮:蓝、白、灰 */
@@ -1423,7 +1423,7 @@ samp {
}
.newcourses .ant-select-selection--single:hover {
- border: 1px solid #d9d9d9 !important;
+ border: 1px solid rgba(70, 106, 255, 1) !important;
}
.pd20 {
@@ -1528,9 +1528,6 @@ samp {
display: none;
}
-.exerciselist .ant-input {
- border: 1px solid #d9d9d9 !important;
-}
.exercisetime .ant-form-explain {
margin-left: 107px;
@@ -1689,18 +1686,12 @@ samp {
height: 40px;
}
-.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
- border: 1px solid #d9d9d9 !important;
-}
.ant-input-affix-wrapper .ant-input-prefix,
.ant-input-affix-wrapper .ant-input-suffix {
background: #fafafa !important;
}
-.ant-input:hover {
- border: 1px solid #d9d9d9 !important;
-}
.ant-input:focus {
box-shadow: none !important;
diff --git a/src/modules/courses/publicNav/nav.css b/src/modules/courses/publicNav/nav.css
index b6d8c7aab..1d6edf785 100644
--- a/src/modules/courses/publicNav/nav.css
+++ b/src/modules/courses/publicNav/nav.css
@@ -11,9 +11,6 @@
.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){
border:1px solid #d9d9d9!important;
}
-.ant-input:hover{
- border:1px solid #d9d9d9!important;
-}
.ant-input:focus{
box-shadow:none!important;
background-color: #fff!important;
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index 859ddcf96..bdd6d36a8 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -163,7 +163,6 @@ body>.-task-title {
outline: 0;
-webkit-box-shadow: 0 0 0 2px transparent;
box-shadow: 0 0 0 2px transparent;
- border: 1px solid #d9d9d9;
}
.HeaderSearch .ant-input-search .ant-input::-webkit-input-placeholder {