- {item.message}
+
{
+ window.scrollTo(0, 0);
const { detail , mdFlag } = this.props;
this.setState({
value: detail.content,
@@ -214,7 +215,7 @@ class CoderRootFileDetail extends Component {
const Option = Select.Option;
return (
-
+
{
md && readOnly &&
diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js
index b5d241968..7ff25dae1 100644
--- a/src/forge/Main/CoderRootIndex.js
+++ b/src/forge/Main/CoderRootIndex.js
@@ -3,7 +3,6 @@ import { Route , Switch } from 'react-router-dom';
// import Top from './DetailTop';
import Loadable from 'react-loadable';
import Loading from '../../Loading';
-import axios from 'axios';
import './Index.scss';
const FileNew = Loadable({
@@ -51,37 +50,37 @@ class CoderRootIndex extends Component{
}
}
- componentDidMount=()=>{
- this.Init();
- }
- componentDidUpdate=(prevProps)=>{
- const { location } = this.props;
- const prevlocation = prevProps && prevProps.location;
- if (location !== prevlocation) {
- this.Init();
- }
- }
+ // componentDidMount=()=>{
+ // this.Init();
+ // }
+ // componentDidUpdate=(prevProps)=>{
+ // const { location } = this.props;
+ // const prevlocation = prevProps && prevProps.location;
+ // if (location !== prevlocation) {
+ // this.Init();
+ // }
+ // }
- Init=()=>{
- const { branchName } = this.props.match.params;
- const { defaultBranch } = this.props;
- this.getTopCount(branchName || defaultBranch);
- }
+ // Init=()=>{
+ // const { branchName } = this.props.match.params;
+ // const { defaultBranch } = this.props;
+ // this.getTopCount(branchName || defaultBranch);
+ // }
// 获取
组件里要显示的数据
- getTopCount=(branch)=>{
- const { projectsId , owner } = this.props.match.params;
- const url = `/${owner}/${projectsId}/top_counts.json`;
- axios.get(url,{params:{
- ref:branch
- }}).then(result=>{
- if(result){
- this.setState({
- coderCount:result.data
- })
- }
- }).catch(error=>{console.log(error);})
- }
+ // getTopCount=(branch)=>{
+ // const { projectsId , owner } = this.props.match.params;
+ // const url = `/${owner}/${projectsId}/top_counts.json`;
+ // axios.get(url,{params:{
+ // ref:branch
+ // }}).then(result=>{
+ // if(result){
+ // this.setState({
+ // coderCount:result.data
+ // })
+ // }
+ // }).catch(error=>{console.log(error);})
+ // }
render(){
return(
@@ -100,12 +99,12 @@ class CoderRootIndex extends Component{
>
( )
+ (props) => ( )
}
>
( )
+ () => ( )
}
>
( )
+ () => ( )
}
>
{/*
{
{commit && commit.message &&
-
{commit.message}
+
}
{data.branch}
diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss
index a19bd80da..a177ccc79 100644
--- a/src/forge/Main/Index.scss
+++ b/src/forge/Main/Index.scss
@@ -224,7 +224,7 @@
height: 8px;
width: 8px;
left: 0px;
- top:10px
+ top:8px;
}
&>span{
padding-left: 15px;
@@ -252,7 +252,13 @@
border: 1px solid rgba(42, 97, 255, 0.23);
background-color: #FAFCFF;
.ellipsistxt{
- margin-top: 6px;
+ &:hover .markdown-body{
+ color: #466AFF;
+ & a{
+ color: #466AFF;
+ }
+ }
+ margin-top: 2px;
// cursor: pointer;
#ptxt{
margin-bottom: 0px;
@@ -263,6 +269,25 @@
white-space:-pre-wrap; /* Opera 4-6 */
white-space:-o-pre-wrap; /* Opera 7 */
word-wrap:break-word;
+ .markdown-body{
+ line-height: 10px;
+ & p {
+ margin: 0px 0px !important;
+ }
+ & ol,ul{
+ padding-bottom: 3px;
+ & li{
+ min-height: 18px;
+ }
+ }
+ & table{
+ line-height: 1;
+ background: #FAFCFF;
+ }
+ &:first-child {
+ margin-top: -1px !important;
+ }
+ }
}
margin-left: 13px;
line-height:18px;
@@ -270,7 +295,7 @@
width: 0;
color: #666;
&.hidetxt{
- height: 18px;
+ height: 24px;
overflow: hidden;
position: relative;
padding-right:8px;
diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss
index 73b534de9..83b4d5ee7 100644
--- a/src/forge/Main/list.scss
+++ b/src/forge/Main/list.scss
@@ -735,6 +735,9 @@ a.color-grey-ccc:hover{
border-radius: 4px;
margin-left: 16px;
align-items: center;
+ & .markdown-body table{
+ background: #FAFCFF;
+ }
&:after,&:before{
content: "";
position: absolute;
@@ -760,6 +763,9 @@ a.color-grey-ccc:hover{
&:before{
border-right: 10px solid rgba(42, 97, 255, 0.58);
}
+ & .markdown-body table{
+ background: #EEF6FF;
+ }
}
.treecopy-cont{
padding: 4px 15px;
diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx
index 88cca13b5..6a111b454 100644
--- a/src/forge/Main/tag/Index.jsx
+++ b/src/forge/Main/tag/Index.jsx
@@ -1,17 +1,19 @@
import React,{ useEffect , useState } from 'react';
import SubMenu from '../sub/SubMenu';
-import { Table , Tooltip } from 'antd';
+import { Table , Tooltip , Spin } from 'antd';
import axios from 'axios';
import { Link } from 'react-router-dom';
import { truncateCommitId } from '../../common/util';
+import { getImageUrl } from 'educoder';
+import Nonedata from '../../Nodata';
import './Index.scss';
import Tree from '../img/tree.png'
import moment from 'moment';
-
function Tags(props) {
- const [ source , setSource ] = useState([]);
+ const [ source , setSource ] = useState(undefined);
+ const [ isSpin , setIsSpin ] = useState(true);
const { projectsId , owner } = props.match.params;
@@ -21,6 +23,7 @@ function Tags(props) {
axios.get(url).then((result) => {
if (result) {
setSource(result.data);
+ setIsSpin(false);
}
}).catch(error => {})
}
@@ -32,8 +35,13 @@ function Tags(props) {
dataIndex:"name",
key:1,
ellipsis:true,
+ width:"200px",
render:(txt,item)=>{
- return
{item.name}
+ return(
+
+ {item.name}
+
+ )
}
},
{
@@ -43,8 +51,22 @@ function Tags(props) {
ellipsis:true,
render:(txt,item)=>{
return (
-
- {item.commit && item.commit.name}
+
+ {
+ item.tagger &&
+
+ {
+ item.tagger.id ?
+
+
+
+ :
+
+
+
+ }
+
+ }
创建于{txt}
)
@@ -59,7 +81,7 @@ function Tags(props) {
return (
- {truncateCommitId(item.commit && item.commit.sha)}
+ {truncateCommitId(item.id)}
)
}
@@ -79,18 +101,17 @@ function Tags(props) {
key:5,
ellipsis:true,
align:"center",
- width:"181px",
+ width:"204px",
render:(txt,item)=>{
return (
-
+
)
}
}
@@ -98,7 +119,19 @@ function Tags(props) {
return(
-
+
+
+ {
+ source && source.length > 0 &&
+
+ }
+ {
+ source && source.length === 0 &&
+ }
+
+
)
}
diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss
index 3bd487db6..70e83a837 100644
--- a/src/forge/Main/tag/Index.scss
+++ b/src/forge/Main/tag/Index.scss
@@ -4,6 +4,7 @@
tr th{
background-color: #fff;
padding:5px 0px;
+ width: 172px;
.ant-table-column-title{
font-size: 16px;
font-weight: 500;
@@ -12,6 +13,9 @@
}
}
tbody{
+ .btn-83{
+ margin:0px 8px;
+ }
tr{
&:hover td{
background-color: #fff!important;
@@ -20,6 +24,10 @@
padding:0px;
height: 69px;
line-height: 69px;
+ color:#333333;
+ div{
+ font-weight: 500;
+ }
}
&:last-child{
td{
@@ -28,4 +36,27 @@
}
}
}
+}
+.tagSpin{
+ min-height: 300px;
+ text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.tagBranch{
+ padding-right: 15px;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ .tagClass{
+ color:#333333;
+ }
+}
+.tagModel{
+ font-weight: 400;
+ .tagModelImg img{
+ width: 25px;
+ height: 25px;
+ border-radius: 50%;
+ }
}
\ No newline at end of file
diff --git a/src/forge/Main/version/version.js b/src/forge/Main/version/version.js
index 68cfd7746..2896899fc 100644
--- a/src/forge/Main/version/version.js
+++ b/src/forge/Main/version/version.js
@@ -15,10 +15,9 @@ function version(props) {
const [ releases , setReleases ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
const { projectsId ,owner } = props.match.params;
- const { isManager, isDeveloper, location , user } = props;
+ const { location } = props;
const type = props.projectDetail && props.projectDetail.type;
const turnFromNew = location && location.query && location.query.turnFromNew;
- const current_user_login = user && user.login;
useEffect(()=>{
getIssueList();
},[])
@@ -34,7 +33,6 @@ function version(props) {
setReleases(result.data.releases);
setIsSpin(false);
}
-
}).catch((error) => {
console.log(error);
})
@@ -130,6 +128,8 @@ function version(props) {
addFunc={addFunc}
/>
)
+ } else{
+ return (
)
}
}
diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx
index 172038b21..b4cf5b488 100644
--- a/src/forge/Merge/Files.jsx
+++ b/src/forge/Merge/Files.jsx
@@ -1,7 +1,7 @@
-import React ,{useEffect,useRef,useState } from 'react';
+import React ,{useEffect,useState } from 'react';
import { truncateCommitId } from '../common/util';
import { AlignCenter , FlexAJ } from '../Component/layout';
-import { Button, Tooltip,Progress, Popover, Anchor } from 'antd';
+import { Tooltip,Progress } from 'antd';
import './merge.css';
import './Index.scss';
@@ -16,6 +16,10 @@ function Files({ data,history,owner,projectsId , parentsSha }){
}
},[data]);
+ useEffect(()=>{
+ document.addEventListener('click',()=>{setIsOpen(false)})
+ })
+
function showDown(flag,index,isBin){
if(!isBin){
var lists = files.concat();
@@ -48,7 +52,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
{item.name}
-
0 && ":"}${item.addition>0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}>
+ 0 ? ":":""}${item.addition>0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}>
{item.addition >0 && +{item.addition} }
{item.deletion >0 && -{item.deletion} }
@@ -63,7 +67,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
)
return(
-
+
{e.nativeEvent.stopImmediatePropagation()}}>
{setIsOpen(!isOpen)}}>
@@ -96,7 +100,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
-
0 && ":"} ${item.addition > 0 ? item.addition + "处添加" : ""}${item.addition > 0 && item.deletion > 0 ? "和" : ""}${item.deletion > 0 ? item.deletion + "处删除" : ""}`}>
+ 0 ? ":":""} ${item.addition > 0 ? item.addition + "处添加" : ""}${item.addition > 0 && item.deletion > 0 ? "和" : ""}${item.deletion > 0 ? item.deletion + "处删除" : ""}`}>
{item.addition+item.deletion}处
diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js
index 84ae9b33e..aa4bba6e9 100644
--- a/src/forge/Newfile/UserSubmitComponent.js
+++ b/src/forge/Newfile/UserSubmitComponent.js
@@ -83,8 +83,7 @@ class UserSubmitComponent extends Component {
if (result.data && result.data.name) {
this.props.showNotification("文件新建成功!");
if(submitType === "1"){
- const { getTopCount , getDetail } = this.props;
- getTopCount && getTopCount(values.branchname);
+ const { getDetail } = this.props;
getDetail && getDetail();
}
let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;
diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx
index ea23ab079..48a19c227 100644
--- a/src/forge/Team/List.jsx
+++ b/src/forge/Team/List.jsx
@@ -19,7 +19,6 @@ function List(props){
const [ search , setSearch ] = useState(undefined);
const [ page , setPage ] = useState(1);
const [ sortBy , setSortBy ] = useState("updated_on");
- const [ sortDirection , setSortDirection ] = useState("asc");
const OIdentifier = props.match.params.OIdentifier;
const organizeDetail = props.organizeDetail;
@@ -37,7 +36,7 @@ function List(props){
params:{
search,page,limit,
sort_by:sortBy,
- sort_direction:sortDirection
+ sort_direction:"desc"
}
}).then(result=>{
if(result && result.data){
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss
index 5926c734f..a19619d73 100644
--- a/src/forge/css/index.scss
+++ b/src/forge/css/index.scss
@@ -104,6 +104,9 @@ ul,ol,dl{
white-space: normal;
&:hover{
text-decoration: underline;
+ & .markdown-body{
+ color: #466AFF;
+ }
}
}