Merge branch 'pre_develop' of https://git.trustie.net/Gitlink/forgeplus-react into feature_notification_v2
This commit is contained in:
commit
8c7865d2c1
|
@ -1949,9 +1949,7 @@ a.decoration {
|
||||||
}
|
}
|
||||||
|
|
||||||
.mr20 {
|
.mr20 {
|
||||||
margin-right: 10px;
|
margin-right: 20px;
|
||||||
margin-left: 10px;
|
|
||||||
float: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mr25 {
|
.mr25 {
|
||||||
|
@ -1959,7 +1957,7 @@ a.decoration {
|
||||||
}
|
}
|
||||||
|
|
||||||
.mr30 {
|
.mr30 {
|
||||||
margin-right: 10px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mr35 {
|
.mr35 {
|
||||||
|
|
|
@ -53,8 +53,10 @@ function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owne
|
||||||
setIsSpin(true);
|
setIsSpin(true);
|
||||||
if(e.key === "branch"){
|
if(e.key === "branch"){
|
||||||
getBranchs(projectsId,owner);
|
getBranchs(projectsId,owner);
|
||||||
|
setNav(0);
|
||||||
}else{
|
}else{
|
||||||
getTags(projectsId,owner);
|
getTags(projectsId,owner);
|
||||||
|
setNav(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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])
|
||||||
|
@ -401,7 +402,7 @@ function CoderDepot(props){
|
||||||
getPathUrl={getPathUrl}
|
getPathUrl={getPathUrl}
|
||||||
/>
|
/>
|
||||||
:
|
:
|
||||||
<div>
|
<React.Fragment>
|
||||||
<AlignCenter className="mr20">
|
<AlignCenter className="mr20">
|
||||||
<Link to={`/${owner}/${projectsId}/branches`} className="iconBtn">
|
<Link to={`/${owner}/${projectsId}/branches`} className="iconBtn">
|
||||||
<i className="iconfont icon-master_icon font-16"></i>
|
<i className="iconfont icon-master_icon font-16"></i>
|
||||||
|
@ -416,7 +417,7 @@ function CoderDepot(props){
|
||||||
<span>{projectDetail && projectDetail.tags && projectDetail.tags.total_count}</span>
|
<span>{projectDetail && projectDetail.tags && projectDetail.tags.total_count}</span>
|
||||||
</Link>
|
</Link>
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
</div>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
<AlignCenter className="depotBtn">
|
<AlignCenter className="depotBtn">
|
||||||
|
@ -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> }
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 &&
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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,9 +89,9 @@ 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/${data.branch}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link>
|
||||||
</div>
|
</div>
|
||||||
<Button type="primary" onClick={()=>{history.push(`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`)}} className="btnblue" style={{height:"36px"}}>浏览文件</Button>
|
<Button type="primary" onClick={()=>{history.push(`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`)}} className="btnblue" style={{height:"36px"}}>浏览文件</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
&:nth-child(5){
|
&:nth-child(5n){
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,27 @@
|
||||||
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;
|
||||||
|
font-size: 14px;
|
||||||
|
& p {
|
||||||
|
margin: 1px 0px 0px !important;
|
||||||
|
font-size: 14px !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 +297,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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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>
|
<Spin spinning={isSpin}>
|
||||||
|
<div className="tagSpin">
|
||||||
|
{
|
||||||
|
source && source.length > 0 &&
|
||||||
|
<Table
|
||||||
|
className="tagTable"
|
||||||
|
dataSource={source} columns={columns} pagination={false}></Table>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
source && source.length === 0 && <Nonedata _html={'暂无数据~'}/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tagSpin{
|
||||||
|
min-height: 300px;
|
||||||
|
}
|
||||||
|
.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%;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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)}` : "")}`;
|
||||||
|
|
|
@ -153,15 +153,20 @@ class Setting extends Component {
|
||||||
name: values.project_name,
|
name: values.project_name,
|
||||||
description: values.project_description,
|
description: values.project_description,
|
||||||
private: private_check,
|
private: private_check,
|
||||||
|
identifier:values.project_identifier,
|
||||||
...values,
|
...values,
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.props.showNotification(`仓库信息修改成功!`);
|
|
||||||
const { getDetail } = this.props;
|
|
||||||
getDetail && getDetail();
|
|
||||||
this.setState({
|
this.setState({
|
||||||
loading:false
|
loading:false
|
||||||
})
|
})
|
||||||
|
this.props.showNotification(`仓库信息修改成功!`);
|
||||||
|
// if(values.project_identifier !== projectsId){
|
||||||
|
// this.props.history.push(`/${owner}/${values.project_identifier}/settings`);
|
||||||
|
// }else{
|
||||||
|
// }
|
||||||
|
const { getDetail } = this.props;
|
||||||
|
getDetail && getDetail();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@ -283,6 +288,18 @@ class Setting extends Component {
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
|
{/* <Form.Item label="项目标识 (项目url标识部分,更改项目标识将导致原仓库地址失效)">
|
||||||
|
{getFieldDecorator("project_identifier", {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入项目标识",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})(
|
||||||
|
<Input placeholder="项目标识请使用与项目相关的英文关键字" maxLength="100" />
|
||||||
|
)}
|
||||||
|
</Form.Item> */}
|
||||||
<Form.Item label="项目简介">
|
<Form.Item label="项目简介">
|
||||||
{getFieldDecorator("project_description", {
|
{getFieldDecorator("project_description", {
|
||||||
rules: [],
|
rules: [],
|
||||||
|
|
|
@ -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){
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue