Merge branch 'pre_develop' of https://git.trustie.net/Gitlink/forgeplus-react into feature_pull_routers

This commit is contained in:
yuzhantian 2021-10-12 16:12:38 +08:00
commit 50f785bf42
14 changed files with 171 additions and 65 deletions

View File

@ -22,6 +22,7 @@ import UpdateDescModal from './sub/UpdateDescModal';
import Nodata from '../Nodata'; import Nodata from '../Nodata';
import Invite from './sub/Invite'; import Invite from './sub/Invite';
import CheckProfile from '../Component/ProfileModal/Profile'; import CheckProfile from '../Component/ProfileModal/Profile';
import RenderHtml from '../../components/render-html';
/** /**
* projectDetail.type:0是托管项目1是镜像项目2是同步镜像项目(为2时不支持在线创建在线上传在线修改在线删除创建合并请求等功能) * projectDetail.type:0是托管项目1是镜像项目2是同步镜像项目(为2时不支持在线创建在线上传在线修改在线删除创建合并请求等功能)
*/ */
@ -196,7 +197,7 @@ function CoderDepot(props){
let ele = document.getElementById("ptxt"); let ele = document.getElementById("ptxt");
if(ele){ if(ele){
let h = ele.offsetHeight; let h = ele.offsetHeight;
if( h > 18 ) setHideBtn(true); if( h > 35 ) setHideBtn(true);
} }
} }
},[projectDetail,lastCommit]) },[projectDetail,lastCommit])
@ -457,7 +458,7 @@ function CoderDepot(props){
<div className="listtablehead"> <div className="listtablehead">
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/> <User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}> <div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}>{lastCommit.message}</Link></pre> <pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}><RenderHtml value={lastCommit.message}/></Link></pre>
</div> </div>
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> } { hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }

View File

@ -6,7 +6,8 @@ import { AlignTop } from '../Component/layout';
import SelectBranch from '../Branch/Select'; import SelectBranch from '../Branch/Select';
import Nodata from '../Nodata'; import Nodata from '../Nodata';
import User from '../Component/User' import User from '../Component/User';
import RenderHtml from '../../components/render-html.jsx';
import Tree from './img/tree.png'; import Tree from './img/tree.png';
import axios from 'axios'; import axios from 'axios';
import {Link} from "react-router-dom"; import {Link} from "react-router-dom";
@ -158,7 +159,7 @@ class CoderRootCommit extends Component{
<div className="commitList-item f-wrap-between"> <div className="commitList-item f-wrap-between">
<div> <div>
<AlignTop> <AlignTop>
<div className="commitDesc"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="font-14 color-grey-3 font-bd">{item.message}</Link></div> <div className="commitDesc"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="font-14 color-grey-3 font-bd"><RenderHtml value={item.message}/></Link></div>
</AlignTop> </AlignTop>
<p className="f-wrap-alignCenter mt15 pb5"> <p className="f-wrap-alignCenter mt15 pb5">
<User <User

View File

@ -27,6 +27,7 @@ class CoderRootFileDetail extends Component {
} }
componentDidMount = () => { componentDidMount = () => {
window.scrollTo(0, 0);
const { detail , mdFlag } = this.props; const { detail , mdFlag } = this.props;
this.setState({ this.setState({
value: detail.content, value: detail.content,
@ -214,7 +215,7 @@ class CoderRootFileDetail extends Component {
const Option = Select.Option; const Option = Select.Option;
return ( return (
<React.Fragment> <React.Fragment>
<Anchor className="griditemAnchor" offsetTop={70} targetOffset={160}> <Anchor className="griditemAnchor" offsetTop={70}>
<div className="griditemCate"> <div className="griditemCate">
{ {
md && readOnly && md && readOnly &&

View File

@ -3,7 +3,6 @@ import { Route , Switch } from 'react-router-dom';
// import Top from './DetailTop'; // import Top from './DetailTop';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../Loading'; import Loading from '../../Loading';
import axios from 'axios';
import './Index.scss'; import './Index.scss';
const FileNew = Loadable({ const FileNew = Loadable({
@ -51,37 +50,37 @@ class CoderRootIndex extends Component{
} }
} }
componentDidMount=()=>{ // componentDidMount=()=>{
this.Init(); // this.Init();
} // }
componentDidUpdate=(prevProps)=>{ // componentDidUpdate=(prevProps)=>{
const { location } = this.props; // const { location } = this.props;
const prevlocation = prevProps && prevProps.location; // const prevlocation = prevProps && prevProps.location;
if (location !== prevlocation) { // if (location !== prevlocation) {
this.Init(); // this.Init();
} // }
} // }
Init=()=>{ // Init=()=>{
const { branchName } = this.props.match.params; // const { branchName } = this.props.match.params;
const { defaultBranch } = this.props; // const { defaultBranch } = this.props;
this.getTopCount(branchName || defaultBranch); // this.getTopCount(branchName || defaultBranch);
} // }
// 获取<Top />组件里要显示的数据 // 获取<Top />组件里要显示的数据
getTopCount=(branch)=>{ // getTopCount=(branch)=>{
const { projectsId , owner } = this.props.match.params; // const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/top_counts.json`; // const url = `/${owner}/${projectsId}/top_counts.json`;
axios.get(url,{params:{ // axios.get(url,{params:{
ref:branch // ref:branch
}}).then(result=>{ // }}).then(result=>{
if(result){ // if(result){
this.setState({ // this.setState({
coderCount:result.data // coderCount:result.data
}) // })
} // }
}).catch(error=>{console.log(error);}) // }).catch(error=>{console.log(error);})
} // }
render(){ render(){
return( return(
<div className="coderSubPage"> <div className="coderSubPage">
@ -100,12 +99,12 @@ class CoderRootIndex extends Component{
></Route> ></Route>
<Route path="/:owner/:projectsId/:branch/newfile" <Route path="/:owner/:projectsId/:branch/newfile"
render={ render={
(props) => (<FileNew {...this.props} {...props} {...this.state} getTopCount={this.getTopCount} />) (props) => (<FileNew {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/:owner/:projectsId/commits/branch/:branchName" <Route path="/:owner/:projectsId/commits/branch/:branchName"
render={ render={
() => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" getTopCount={this.getTopCount} />) () => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" />)
} }
></Route> ></Route>
<Route path="/:owner/:projectsId/commits/:sha" <Route path="/:owner/:projectsId/commits/:sha"
@ -115,7 +114,7 @@ class CoderRootIndex extends Component{
></Route> ></Route>
<Route path="/:owner/:projectsId/commits" <Route path="/:owner/:projectsId/commits"
render={ render={
() => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" getTopCount={this.getTopCount} />) () => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" />)
} }
></Route> ></Route>
{/* <Route path="/:owner/:projectsId/releases/:versionId/update" {/* <Route path="/:owner/:projectsId/releases/:versionId/update"

View File

@ -6,6 +6,7 @@ import { getImageUrl } from 'educoder';
import Files from '../Merge/Files'; import Files from '../Merge/Files';
import Tree from "./img/tree.png"; import Tree from "./img/tree.png";
import User from "../Component/User"; import User from "../Component/User";
import RenderHtml from "../../components/render-html";
import axios from "axios"; import axios from "axios";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
@ -17,6 +18,9 @@ const Infos = styled.div`
border: 1px solid rgba(42, 97, 255, 0.23); border: 1px solid rgba(42, 97, 255, 0.23);
border-radius: 3px 3px 0px 0px; border-radius: 3px 3px 0px 0px;
padding: 10px 20px 10px 16px; padding: 10px 20px 10px 16px;
& .markdown-body table{
background: #f1f8ff;
}
& .f-wrap-between{ & .f-wrap-between{
align-items: center; align-items: center;
} }
@ -85,7 +89,7 @@ export default (props) => {
<div className="f-wrap-between"> <div className="f-wrap-between">
<div> <div>
{commit && commit.message && {commit && commit.message &&
<pre className="task-hide">{commit.message}</pre> <RenderHtml className="task-hide" value={commit.message}/>
} }
<Link to={`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link> <Link to={`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link>
</div> </div>

View File

@ -224,7 +224,7 @@
height: 8px; height: 8px;
width: 8px; width: 8px;
left: 0px; left: 0px;
top:10px top:8px;
} }
&>span{ &>span{
padding-left: 15px; padding-left: 15px;
@ -252,7 +252,13 @@
border: 1px solid rgba(42, 97, 255, 0.23); border: 1px solid rgba(42, 97, 255, 0.23);
background-color: #FAFCFF; background-color: #FAFCFF;
.ellipsistxt{ .ellipsistxt{
margin-top: 6px; &:hover .markdown-body{
color: #466AFF;
& a{
color: #466AFF;
}
}
margin-top: 2px;
// cursor: pointer; // cursor: pointer;
#ptxt{ #ptxt{
margin-bottom: 0px; margin-bottom: 0px;
@ -263,6 +269,25 @@
white-space:-pre-wrap; /* Opera 4-6 */ white-space:-pre-wrap; /* Opera 4-6 */
white-space:-o-pre-wrap; /* Opera 7 */ white-space:-o-pre-wrap; /* Opera 7 */
word-wrap:break-word; 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; margin-left: 13px;
line-height:18px; line-height:18px;
@ -270,7 +295,7 @@
width: 0; width: 0;
color: #666; color: #666;
&.hidetxt{ &.hidetxt{
height: 18px; height: 24px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
padding-right:8px; padding-right:8px;

View File

@ -735,6 +735,9 @@ a.color-grey-ccc:hover{
border-radius: 4px; border-radius: 4px;
margin-left: 16px; margin-left: 16px;
align-items: center; align-items: center;
& .markdown-body table{
background: #FAFCFF;
}
&:after,&:before{ &:after,&:before{
content: ""; content: "";
position: absolute; position: absolute;
@ -760,6 +763,9 @@ a.color-grey-ccc:hover{
&:before{ &:before{
border-right: 10px solid rgba(42, 97, 255, 0.58); border-right: 10px solid rgba(42, 97, 255, 0.58);
} }
& .markdown-body table{
background: #EEF6FF;
}
} }
.treecopy-cont{ .treecopy-cont{
padding: 4px 15px; padding: 4px 15px;

View File

@ -1,17 +1,19 @@
import React,{ useEffect , useState } from 'react'; import React,{ useEffect , useState } from 'react';
import SubMenu from '../sub/SubMenu'; import SubMenu from '../sub/SubMenu';
import { Table , Tooltip } from 'antd'; import { Table , Tooltip , Spin } from 'antd';
import axios from 'axios'; import axios from 'axios';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { truncateCommitId } from '../../common/util'; import { truncateCommitId } from '../../common/util';
import { getImageUrl } from 'educoder';
import Nonedata from '../../Nodata';
import './Index.scss'; import './Index.scss';
import Tree from '../img/tree.png' import Tree from '../img/tree.png'
import moment from 'moment'; import moment from 'moment';
function Tags(props) { function Tags(props) {
const [ source , setSource ] = useState([]); const [ source , setSource ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
const { projectsId , owner } = props.match.params; const { projectsId , owner } = props.match.params;
@ -21,6 +23,7 @@ function Tags(props) {
axios.get(url).then((result) => { axios.get(url).then((result) => {
if (result) { if (result) {
setSource(result.data); setSource(result.data);
setIsSpin(false);
} }
}).catch(error => {}) }).catch(error => {})
} }
@ -32,8 +35,13 @@ function Tags(props) {
dataIndex:"name", dataIndex:"name",
key:1, key:1,
ellipsis:true, ellipsis:true,
width:"200px",
render:(txt,item)=>{ render:(txt,item)=>{
return <Link className="hover" to={`/${owner}/${projectsId}/tree/${item.name}`} >{item.name}</Link> return(
<div className="tagBranch">
<Link className="hover tagClass" to={`/${owner}/${projectsId}/tree/${item.name}`}>{item.name}</Link>
</div>
)
} }
}, },
{ {
@ -43,8 +51,22 @@ function Tags(props) {
ellipsis:true, ellipsis:true,
render:(txt,item)=>{ render:(txt,item)=>{
return ( return (
<span className="color-grey-3"> <span className="color-grey-3 tagModel">
<Link className="mr3" style={{fontWeight:"500"}} to={`/${item.commit && item.commit.login}`} >{item.commit && item.commit.name}</Link> {
item.tagger &&
<Tooltip placement="top" title={item.tagger.name}>
{
item.tagger.id ?
<Link className="mr3 tagModelImg" to={`/${item.tagger.login}`} >
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt=""/>
</Link>
:
<span className="mr3 tagModelImg" style={{cursor:"default"}}>
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt=""/>
</span>
}
</Tooltip>
}
<span>创建于{txt}</span> <span>创建于{txt}</span>
</span> </span>
) )
@ -59,7 +81,7 @@ function Tags(props) {
return ( return (
<Tooltip placement="top" title={`最后提交日期:${item.created_at_unix ? moment(item.created_at_unix*1000).format('YYYY-MM-DD'):''}`}> <Tooltip placement="top" title={`最后提交日期:${item.created_at_unix ? moment(item.created_at_unix*1000).format('YYYY-MM-DD'):''}`}>
<img src={Tree} alt="提交ID" width="22px" className="mr4"/> <img src={Tree} alt="提交ID" width="22px" className="mr4"/>
<Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`}>{truncateCommitId(item.commit && item.commit.sha)}</Link> <Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`}>{truncateCommitId(item.id)}</Link>
</Tooltip> </Tooltip>
) )
} }
@ -79,18 +101,17 @@ function Tags(props) {
key:5, key:5,
ellipsis:true, ellipsis:true,
align:"center", align:"center",
width:"181px", width:"204px",
render:(txt,item)=>{ render:(txt,item)=>{
return ( return (
<div> <React.Fragment>
<a href={`${item.tarball_url}`} download className="btn-83"> <a href={`${item.tarball_url}`} download className="btn-83">
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR <i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR
</a> </a>
<a href={`${item.zipball_url}`} download className="btn-83"> <a href={`${item.zipball_url}`} download className="btn-83">
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP <i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
</a> </a>
</div> </React.Fragment>
) )
} }
} }
@ -98,7 +119,19 @@ function Tags(props) {
return( return(
<div> <div>
<SubMenu tab={"tags"} projectsId={projectsId} owner={owner}/> <SubMenu tab={"tags"} projectsId={projectsId} owner={owner}/>
<Table className="tagTable" dataSource={source} columns={columns} pagination={false}></Table> <div className="tagSpin">
<Spin spinning={isSpin}>
{
source && source.length > 0 &&
<Table
className="tagTable"
dataSource={source} columns={columns} pagination={false}></Table>
}
{
source && source.length === 0 && <Nonedata _html={'暂无数据~'}/>
}
</Spin>
</div>
</div> </div>
) )
} }

View File

@ -4,6 +4,7 @@
tr th{ tr th{
background-color: #fff; background-color: #fff;
padding:5px 0px; padding:5px 0px;
width: 172px;
.ant-table-column-title{ .ant-table-column-title{
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
@ -12,6 +13,9 @@
} }
} }
tbody{ tbody{
.btn-83{
margin:0px 8px;
}
tr{ tr{
&:hover td{ &:hover td{
background-color: #fff!important; background-color: #fff!important;
@ -20,6 +24,10 @@
padding:0px; padding:0px;
height: 69px; height: 69px;
line-height: 69px; line-height: 69px;
color:#333333;
div{
font-weight: 500;
}
} }
&:last-child{ &:last-child{
td{ td{
@ -29,3 +37,26 @@
} }
} }
} }
.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%;
}
}

View File

@ -15,10 +15,9 @@ function version(props) {
const [ releases , setReleases ] = useState(undefined); const [ releases , setReleases ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true); const [ isSpin , setIsSpin ] = useState(true);
const { projectsId ,owner } = props.match.params; const { projectsId ,owner } = props.match.params;
const { isManager, isDeveloper, location , user } = props; const { location } = props;
const type = props.projectDetail && props.projectDetail.type; const type = props.projectDetail && props.projectDetail.type;
const turnFromNew = location && location.query && location.query.turnFromNew; const turnFromNew = location && location.query && location.query.turnFromNew;
const current_user_login = user && user.login;
useEffect(()=>{ useEffect(()=>{
getIssueList(); getIssueList();
},[]) },[])
@ -34,7 +33,6 @@ function version(props) {
setReleases(result.data.releases); setReleases(result.data.releases);
setIsSpin(false); setIsSpin(false);
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
}) })
@ -130,6 +128,8 @@ function version(props) {
addFunc={addFunc} addFunc={addFunc}
/> />
) )
} else{
return (<div></div>)
} }
} }

View File

@ -1,7 +1,7 @@
import React ,{useEffect,useRef,useState } from 'react'; import React ,{useEffect,useState } from 'react';
import { truncateCommitId } from '../common/util'; import { truncateCommitId } from '../common/util';
import { AlignCenter , FlexAJ } from '../Component/layout'; import { AlignCenter , FlexAJ } from '../Component/layout';
import { Button, Tooltip,Progress, Popover, Anchor } from 'antd'; import { Tooltip,Progress } from 'antd';
import './merge.css'; import './merge.css';
import './Index.scss'; import './Index.scss';
@ -16,6 +16,10 @@ function Files({ data,history,owner,projectsId , parentsSha }){
} }
},[data]); },[data]);
useEffect(()=>{
document.addEventListener('click',()=>{setIsOpen(false)})
})
function showDown(flag,index,isBin){ function showDown(flag,index,isBin){
if(!isBin){ if(!isBin){
var lists = files.concat(); var lists = files.concat();
@ -48,7 +52,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
<span className="cursor-pointer" data-clipboard-text={item.name}>{item.name}</span> <span className="cursor-pointer" data-clipboard-text={item.name}>{item.name}</span>
</AlignCenter> </AlignCenter>
<div className="see-file"> <div className="see-file">
<Tooltip placement="top" title={`${item.addition+item.deletion}处更改${item.addition + item.deletion > 0 && ""}${item.addition>0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}> <Tooltip placement="top" title={`${item.addition+item.deletion}处更改${item.addition + item.deletion > 0 ? "":""}${item.addition>0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}>
<Progress showInfo = {false} strokeColor = "#2DB44D" size="small" percent={item.addition/(item.addition+item.deletion)*100} /> <Progress showInfo = {false} strokeColor = "#2DB44D" size="small" percent={item.addition/(item.addition+item.deletion)*100} />
{item.addition >0 && <span className="color-green ml10">+{item.addition}</span>} {item.addition >0 && <span className="color-green ml10">+{item.addition}</span>}
{item.deletion >0 && <span className="color-red ml10">-{item.deletion}</span>} {item.deletion >0 && <span className="color-red ml10">-{item.deletion}</span>}
@ -63,7 +67,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
) )
return( return(
<div> <div onClick={(e)=>{e.nativeEvent.stopImmediatePropagation()}}>
<AlignCenter className="color-grey-9" style={{position:'relative'}}> <AlignCenter className="color-grey-9" style={{position:'relative'}}>
<div onClick={()=>{setIsOpen(!isOpen)}}> <div onClick={()=>{setIsOpen(!isOpen)}}>
<i className={`iconfont mr5 ${isOpen? "font-18 icon-sanjiaoxing-down":"font-16 icon-triangle"}`}></i> <i className={`iconfont mr5 ${isOpen? "font-18 icon-sanjiaoxing-down":"font-16 icon-triangle"}`}></i>
@ -96,7 +100,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
</Tooltip> </Tooltip>
</AlignCenter> </AlignCenter>
<div className="see-file"> <div className="see-file">
<Tooltip placement="top" title={`${item.addition + item.deletion}处更改${item.addition + item.deletion > 0 && ""} ${item.addition > 0 ? item.addition + "处添加" : ""}${item.addition > 0 && item.deletion > 0 ? "和" : ""}${item.deletion > 0 ? item.deletion + "处删除" : ""}`}> <Tooltip placement="top" title={`${item.addition + item.deletion}处更改${item.addition + item.deletion > 0 ? "":""} ${item.addition > 0 ? item.addition + "处添加" : ""}${item.addition > 0 && item.deletion > 0 ? "和" : ""}${item.deletion > 0 ? item.deletion + "处删除" : ""}`}>
<Progress showInfo = {false} strokeColor = "#2DB44D" size="small" percent={item.addition/(item.addition+item.deletion)*100} /> <Progress showInfo = {false} strokeColor = "#2DB44D" size="small" percent={item.addition/(item.addition+item.deletion)*100} />
<span className="ml10">{item.addition+item.deletion}</span> <span className="ml10">{item.addition+item.deletion}</span>
</Tooltip> </Tooltip>

View File

@ -83,8 +83,7 @@ class UserSubmitComponent extends Component {
if (result.data && result.data.name) { if (result.data && result.data.name) {
this.props.showNotification("文件新建成功!"); this.props.showNotification("文件新建成功!");
if(submitType === "1"){ if(submitType === "1"){
const { getTopCount , getDetail } = this.props; const { getDetail } = this.props;
getTopCount && getTopCount(values.branchname);
getDetail && getDetail(); getDetail && getDetail();
} }
let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`; let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;

View File

@ -19,7 +19,6 @@ function List(props){
const [ search , setSearch ] = useState(undefined); const [ search , setSearch ] = useState(undefined);
const [ page , setPage ] = useState(1); const [ page , setPage ] = useState(1);
const [ sortBy , setSortBy ] = useState("updated_on"); const [ sortBy , setSortBy ] = useState("updated_on");
const [ sortDirection , setSortDirection ] = useState("asc");
const OIdentifier = props.match.params.OIdentifier; const OIdentifier = props.match.params.OIdentifier;
const organizeDetail = props.organizeDetail; const organizeDetail = props.organizeDetail;
@ -37,7 +36,7 @@ function List(props){
params:{ params:{
search,page,limit, search,page,limit,
sort_by:sortBy, sort_by:sortBy,
sort_direction:sortDirection sort_direction:"desc"
} }
}).then(result=>{ }).then(result=>{
if(result && result.data){ if(result && result.data){

View File

@ -104,6 +104,9 @@ ul,ol,dl{
white-space: normal; white-space: normal;
&:hover{ &:hover{
text-decoration: underline; text-decoration: underline;
& .markdown-body{
color: #466AFF;
}
} }
} }