Merge branch 'gitlink_server' of http://106.75.45.236:3000/Gitlink/forgeplus-react into feature_wiki

This commit is contained in:
谢思 2023-03-28 11:15:43 +08:00
commit 1e10f7785d
36 changed files with 381 additions and 146 deletions

View File

@ -68,11 +68,11 @@
window.onload=function(){
$(".newContainer").delegate("a.anchors","click",function(){
let h = $(this).offset().top - 180;
console.log($(this).offset().top,document.body.scrollTop);
$("html,body").animate({scrollTop:h},10);
window.location.hash = $(this).attr("name");
return false;
});
}
</script>

View File

@ -68,13 +68,14 @@ function Index(props){
return(
<div className="aboutPanels">
<div className="aboutContent">
<AlignCenterBetween style={{padding:"14px 20px"}}>
<span className="font-16"><i className="iconfont icon-xiangmujianjie mr5 font-16 color-blue"></i>项目概览</span>
{ editOpration && !edit && <a onClick={editContent} className="color-blue">编辑</a> }
</AlignCenterBetween>
<div className="aboutTitle">
<span className="font-16">项目概览</span>
{ editOpration && !edit && <a onClick={editContent} className="color-blue">
<i className="iconfont icon-a-bianji12 mr5 font-13 color-blue"></i>编辑</a> }
</div>
{
edit ?
<div className="padding20">
<div className="padding20 boies">
<MDEditor
placeholder={"请输入描述信息"}
height={500}
@ -113,7 +114,7 @@ function Index(props){
</div>
</div>
:
<div className="padding20">
<div className="padding20 boies">
{content ?
<RenderHtml className="break_word_comments imageLayerParent" value={content} url={props.history.location}/>
:

View File

@ -3,10 +3,25 @@
margin:0px auto;
.aboutContent{
border-radius: 2px;
border: 1px solid #EEEEEE;
// border: 1px solid #EEEEEE;
width:100%;
background-color: #fff;
margin-top:20px;
margin-bottom: 30px;
.aboutTitle{
height: 50px;
background-color: #fafcff;
border: 1px solid;
border-color: rgba(42, 97, 255, 0.23);
border-radius: 4px 4px 0px 0px;
display: flex;
align-items: center;
justify-content: space-between;
padding:0px 20px;
}
.boies{
border: 1px solid #d0d0d0;
border-top: none;
}
}
}

View File

@ -9,6 +9,7 @@ import IssueLine from './issueLine';
import BranchLine from './branchLine';
import SmoothLine from './smoothLine';
import SmoothLineTwo from './smoothLineTwo';
import Demo from './demo';
import ProjectScale from './ProjectScale';
import Pie from './pie';
@ -185,74 +186,76 @@ class Activity extends Component{
<div className="contentBox mt20">
<div className="normalBox">
<div class="normalBox-title">概览</div>
<div className="orderInfo">
<div>
<div className="percentLine prPercent">
<p className="percent_purple" style={{width:first_per}}></p>
<p className="percent_green resetStyle" style={{width:`${second_per}`}}></p>
<div className="boxpart">
<div className="orderInfo">
<div>
<div className="percentLine prPercent">
<p className="percent_purple" style={{width:first_per}}></p>
<p className="percent_green resetStyle" style={{width:`${second_per}`}}></p>
</div>
<span>{data && data.pr_all_count}合并请求</span>
</div>
<span>{data && data.pr_all_count}合并请求</span>
</div>
<div>
<div className="percentLine">
<p className="percent_red" style={{width:`${third_per}`}}></p>
<p className="percent_green" style={{width:`${fourth_per}`}}></p>
<div>
<div className="percentLine">
<p className="percent_red" style={{width:`${third_per}`}}></p>
<p className="percent_green" style={{width:`${fourth_per}`}}></p>
</div>
<span>{data && data.issues_count}疑修</span>
</div>
<span>{data && data.issues_count}疑修</span>
</div>
<ul className="percentBox">
<li>
<span className="purple">{data && data.pr_count}</span>
<span className={type==="PullRequest" && status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("PullRequest","delay")}>已处理的合并请求</span>
</li>
<li>
<span className="green">{data && data.new_pr_count}</span>
<span className={type==="PullRequest"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("PullRequest","not_delay")}>未处理的合并请求</span>
</li>
<li>
<span className="red">{data && data.close_issues_count}</span>
<span className={type==="Issue"&& status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","delay")}>已关闭的疑修</span>
</li>
<li>
<span className="green">{data && data.open_issues_count}</span>
<span className={type==="Issue"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","not_delay")}>未处理的疑修</span>
</li>
</ul>
{
codeStatus &&
<div className="prMsg">
<div><span className="fontbold">{codeStatus.author_count}位作者</span> <span className="fontbold">{codeStatus.commit_count}</span>
{codeStatus.commit_count_in_all_branches && codeStatus.commit_count_in_all_branches>0?<span> {projectDetail && projectDetail.default_branch}分支 <span>{codeStatus.commit_count_in_all_branches}次提交</span> </span>:""} {projectDetail && projectDetail.default_branch}
{codeStatus.change_files && codeStatus.change_files >0 ? <span><span className="fontbold">{codeStatus.change_files} 个文件</span> </span>:""}
{codeStatus.additions && codeStatus.additions >0 ?<span><span className="fontbold greencount">新增 {codeStatus.additions} 行代码</span></span>:""}
{(codeStatus.additions && codeStatus.additions >0) &&(codeStatus.deletions && codeStatus.deletions >0) ?<span> </span>:""}
{codeStatus.deletions && codeStatus.deletions >0 ?<span><span className="fontbold redcount"> 删除 {codeStatus.deletions} 行代码</span></span>:""}.</div>
{/* {
codeStatus.authors && codeStatus.authors.length > 0 &&
<ul className="prAuthor">
{
codeStatus.authors.map((i,v)=>{
return(
i.author ?
!i.author.id ?
<span>
<img src={getImageUrl(i.author && i.author.image_url)} width="38px" height="38px" alt=""/>
<Tooltip title={i.author && i.author.name} placement="bottom"><span>{i.author && i.author.name}</span></Tooltip>
</span>
:
<a href={i.author.login ? `/${i.author.login}` : `mailto:${i.author.email}`}>
<img src={getImageUrl(i.author && i.author.image_url)} width="38px" height="38px" alt=""/>
<Tooltip title={i.author && i.author.name} placement="bottom"><span>{i.author && i.author.name}</span></Tooltip>
</a>
:""
)
})
}
</ul>
} */}
</div>
}
</div>
<ul className="percentBox">
<li>
<span className="purple">{data && data.pr_count}</span>
<span className={type==="PullRequest" && status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("PullRequest","delay")}>已处理的合并请求</span>
</li>
<li>
<span className="green">{data && data.new_pr_count}</span>
<span className={type==="PullRequest"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("PullRequest","not_delay")}>未处理的合并请求</span>
</li>
<li>
<span className="red">{data && data.close_issues_count}</span>
<span className={type==="Issue"&& status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","delay")}>已关闭的疑修</span>
</li>
<li>
<span className="green">{data && data.open_issues_count}</span>
<span className={type==="Issue"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","not_delay")}>未处理的疑修</span>
</li>
</ul>
{
codeStatus &&
<div className="prMsg">
<div><span className="fontbold">{codeStatus.author_count}位作者</span> <span className="fontbold">{codeStatus.commit_count}</span>
{codeStatus.commit_count_in_all_branches && codeStatus.commit_count_in_all_branches>0?<span> {projectDetail && projectDetail.default_branch}分支 <span>{codeStatus.commit_count_in_all_branches}次提交</span> </span>:""} {projectDetail && projectDetail.default_branch}
{codeStatus.change_files && codeStatus.change_files >0 ? <span><span className="fontbold">{codeStatus.change_files} 个文件</span> </span>:""}
{codeStatus.additions && codeStatus.additions >0 ?<span><span className="fontbold greencount">新增 {codeStatus.additions} 行代码</span></span>:""}
{(codeStatus.additions && codeStatus.additions >0) &&(codeStatus.deletions && codeStatus.deletions >0) ?<span> </span>:""}
{codeStatus.deletions && codeStatus.deletions >0 ?<span><span className="fontbold redcount"> 删除 {codeStatus.deletions} 行代码</span></span>:""}.</div>
{/* {
codeStatus.authors && codeStatus.authors.length > 0 &&
<ul className="prAuthor">
{
codeStatus.authors.map((i,v)=>{
return(
i.author ?
!i.author.id ?
<span>
<img src={getImageUrl(i.author && i.author.image_url)} width="38px" height="38px" alt=""/>
<Tooltip title={i.author && i.author.name} placement="bottom"><span>{i.author && i.author.name}</span></Tooltip>
</span>
:
<a href={i.author.login ? `/${i.author.login}` : `mailto:${i.author.email}`}>
<img src={getImageUrl(i.author && i.author.image_url)} width="38px" height="38px" alt=""/>
<Tooltip title={i.author && i.author.name} placement="bottom"><span>{i.author && i.author.name}</span></Tooltip>
</a>
:""
)
})
}
</ul>
} */}
</div>
}
</div>
{
ai_shang_v1_url &&
@ -272,12 +275,13 @@ class Activity extends Component{
<SmoothLineTwo url={ai_shang_v4_url}/>
<p>基于信息熵围绕项目社群的社区分裂缩减合并和扩大演化行为度量</p>
</div>
</div>
}
<div className="commentsBox">
<div className="trendsTop">
<span>疑修/合并请求记录</span>
<span className="font-16">疑修/合并请求记录</span>
<div className="branchDropdown f-wrap-alignCenter">
<Dropdown overlay={this.menu()} trigger={['click']} placement="bottomLeft">
<a className="ant-dropdown-link">

View File

@ -1,7 +1,9 @@
.trendsTop{
padding:15px;
border-bottom:1px solid #ddd;
background-color: #f4f4f4;
background-color: #fafcff;
border: 1px solid;
border-color: rgba(42, 97, 255, 0.23);
border-radius: 4px 4px 0px 0px;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
@ -29,6 +31,10 @@
display: flex;
justify-content: space-between;
}
.boxpart{
border: 1px solid #d0d0d0;
border-top: none;
}
.orderInfo > div{
width: 45%;
}
@ -95,7 +101,7 @@
}
.commentsBox{
border-radius: 4px;
border: 1px solid #ddd;
/* border: 1px solid #ddd; */
margin: 20px 0px 20px 0px;
}
.prMsg{
@ -140,6 +146,10 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.activity_list{
border:1px solid #d0d0d0;
border-top: none;
}
.activity_list .activity_item{
border-bottom: 1px solid #f4f4f4;
padding:15px;

File diff suppressed because one or more lines are too long

165
src/forge/Activity/demo.jsx Normal file
View File

@ -0,0 +1,165 @@
import React ,{ useEffect } from 'react';
// import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/line';
import * as echarts from 'echarts';
import axios from 'axios';
import { getdata } from './data'
function Demo({url}) {
useEffect(()=>{
Init();
},[])
function Init() {
let data = getdata();
console.log(data);
var huan_val = document.getElementById("Demo");
var myEcharts = echarts.init(huan_val);
let date = [];
let array = [0];
let array1 = [0];
let array2 = [0];
let option = {
xAxis: {
type: 'time',
data:date,
boundaryGap: false,
axisLabel:{
month:`{M}月`
}
},
tooltip: {
trigger: 'axis',
formatter: function (params) {
params = params[0];
var date = new Date(params.name);
return (
date.getDate() +
'/' +
(date.getMonth() + 1) +
'/' +
date.getFullYear() +
' : ' +
params.value
);
},
axisPointer: {
animation: false
}
},
grid: {
left: '5%',
right: '1%',
top: '8%',
},
legend: {
data: ['issue', 'fork' ,'commit']
},
color: ['red','#36bba6',"skyblue",'#a491d7','#e840f7',"#36bba6","#7b32b2"],
yAxis: {
type: 'value',
scale: true,
boundaryGap: [0, '100%'],
name: '',
min:0,
splitLine : {
show : true,
},
nameLocation:'end',
nameTextStyle:{
fontSize:14,
padding:[0,70,-80,0]
}
},series:[
{
data: array,
type: 'line',
name:"issue",
smooth: true
},
{
data: array1,
type: 'line',
name:"fork",
smooth: true
},
{
data: array2,
type: 'line',
name:"commit",
smooth: true
},
]
};
myEcharts.setOption(option);
setTimeout(()=>{
let count = data.length>15?15:data.length;
for(var i = 0;i<count;i++){
date.push(data[count][0]);
array.push(data[count][1]);
array1.push(data[count][2]);
array2.push(data[count][3]);
}
let interval = setInterval(function () {
count ++ ;
if(count < data.length ){
setValue(count)
}else{
clearInterval(interval);
}
}, 2000);
},1000);
function setValue(count){
for (var i = 0; i < 2; i++) {
array.shift();
array1.shift();
array2.shift();
date.shift();
date.push(data[count][0]);
array.push(data[count][1]);
array1.push(data[count][2]);
array2.push(data[count][3]);
}
myEcharts.setOption({
xAxis: {
type: 'category',
data:date
},
legend: {
data: ['issue', 'fork' ,'commit']
},
series: [
{
data: array,
type: 'line',
name:"issue",
showSymbol: false,
smooth: true
},
{
data: array1,
type: 'line',
name:"fork",
showSymbol: false,
smooth: true
},
{
data: array2,
type: 'line',
name:"commit",
showSymbol: false,
smooth: true
},
]
});
}
}
return(
<div id="Demo" style={{height:"400px"}}></div>
)
}
export default Demo;

View File

@ -166,7 +166,7 @@ function Contributors({owner,projectsId,currentLogin}){
return(
total > 0 ?
<div className="halfs">
<Link to={`/${owner}/${projectsId}/contribute`} className="font-16 color-ooo hoverA">
<Link to={`/${owner}/${projectsId}/contribute`} onClick={()=>{window.scrollTo(0,0)}} className="font-16 color-ooo hoverA">
<span>贡献者</span>
{ total > 0 && <span className="infoCount">{total}</span>}
</Link>
@ -174,7 +174,7 @@ function Contributors({owner,projectsId,currentLogin}){
{
list && list.length>0 && list.map((item,key)=>{
return(
item.id ?
item.login ?
<Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">
<a key={key} href={`/${item.login}`}>
<img src={getImageUrl(`/${item.image_url}`)} alt="" onMouseOver={()=>setVisibleFunc(true,item.login,key)}/>

View File

@ -5,7 +5,7 @@ import { Link } from 'react-router-dom';
function Releases({ owner, projectsId, releaseVersions, distribution }) {
return(
<div>
<Link to={`/${owner}/${projectsId}/releases`} className="font-16 color-ooo hoverA">
<Link to={`/${owner}/${projectsId}/releases`} onClick={()=>{window.scrollTo(0,0)}} className="font-16 color-ooo hoverA">
<span>发行版</span>
{ releaseVersions && releaseVersions.total_count > 0 && <span className="infoCount">{releaseVersions.total_count}</span>}
</Link>

View File

@ -59,7 +59,7 @@ function Datas({checkbox ,item , projectsId,owner}){
<span className="mr20">{item.updated_at}更新</span>
{item.blockchain_token_num && <span className="mr30"><img src={gold} alt="" width="13px" className="mr3"/>{item.blockchain_token_num}</span>}
{item.milestone_name &&
<Link to={`/${owner}/${projectsId}/milestones/${item.milestone_id}`} style={{maxWidth:item.blockchain_token_num ? "261px":"340px",color:"#898d9d"}} title={item.milestone_name} className="task-hide">
<Link to={`/${owner}/${projectsId}/milestones/${item.milestone_id}`} onClick={()=>{window.scrollTo(0,0)}} style={{maxWidth:item.blockchain_token_num ? "261px":"340px",color:"#898d9d"}} title={item.milestone_name} className="task-hide">
<i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>
{item.milestone_name}
</Link>

View File

@ -275,6 +275,7 @@ function Details(props){
...params
}).then(result=>{
if(result){
window.scrollTo(0,0);
props.showNotification("疑修更新成功!");
//
setCommentReload(Math.random());
@ -303,6 +304,7 @@ function Details(props){
due_date
}).then(result=>{
if(result && result.data && result.data.project_issues_index){
window.scrollTo(0,0);
props.showNotification("任务复制成功!");
props.history.push(`/${owner}/${projectsId}/issues/${result.data.project_issues_index}`);
}

View File

@ -197,6 +197,7 @@ function New(props){
blockchain_token_num:rewardAmount
}).then(result=>{
if(result && result.data && result.data.project_issues_index){
window.scrollTo(0,0);
props.showNotification("任务创建成功!");
props.history.push(`/${owner}/${projectsId}/issues/${result.data.project_issues_index}`);
}

View File

@ -47,22 +47,6 @@
background-color: #f3f4f6;
}
}
// 操作按钮-蓝色
.operateButton{
padding:0px 15px;
height:32px;
color: #fff!important;
cursor: pointer;
line-height: 30px;
background-color:rgba(70, 106, 255, 1);
border:1px solid rgba(70, 106, 255, 1);
border-radius: 4px;
display: block;
&:hover{
background-color:#708cff;
border-color:#708cff;
}
}
// flex-左右上下居中
.between{
display: flex;
@ -808,7 +792,7 @@
}
}
li{
width: 100px;
width: 98px;
height:32px;
line-height:30px;
text-align: center;

View File

@ -63,7 +63,7 @@ function CoderDepot(props){
const details = props.projectDetail;
let pathname = props.history.location.pathname;
//distribution
const distribution = details && details.type != 2 && (details.permission === "Admin" || details.permission === "Owner" || details.permission === "Manager");
const distribution = details && details.type !== 2 && ( details.permission && details.permission !== "Reporter");
const { bannerList } = props;
useEffect(()=>{
if(bannerList && bannerList.length>0){
@ -295,6 +295,7 @@ function CoderDepot(props){
let checkvalue = turnbar(enBranch);
let enPath = turnbar(path);
setType(type);
window.scrollTo(0,0)
props.history.push(`/${owner}/${projectsId}${`/tree/${checkvalue}`}${enPath?`/${enPath}`:""}`);
}
}

View File

@ -32,11 +32,11 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId , platform
(
item.submodule_git_url ?
<React.Fragment>
<a href={`${item.submodule_git_url.slice(0,item.submodule_git_url.length-4)}`} target="_self">
<a href={`${item.submodule_git_url.slice(0,item.submodule_git_url.length-4)}`} onClick={()=>{window.scrollTo(0,0)}} target="_self">
<i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name}
</a>
<span className="ml2">@</span>
<a href={`${item.submodule_git_url.slice(0,item.submodule_git_url.length-4)}/commits/${truncateCommitId(item.sha)}`} title={item.sha}>{truncateCommitId(item.sha)}</a>
<a href={`${item.submodule_git_url.slice(0,item.submodule_git_url.length-4)}/commits/${truncateCommitId(item.sha)}`} onClick={()=>{window.scrollTo(0,0)}} title={item.sha}>{truncateCommitId(item.sha)}</a>
</React.Fragment>
:
<React.Fragment>

View File

@ -35,7 +35,7 @@ class IndexItem extends Component {
<div className="p-r-Infos">
<div className="p-r-name">
<AlignCenter>
<Link to={`/${item.author.login}/${item.identifier}`} target="_blank" title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
<Link to={`/${item.author.login}/${item.identifier}`} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
{item.author.name}/{item.name}
</Link>
{ !item.is_public && <span className="privateTag">私有</span> }

View File

@ -63,7 +63,7 @@ function Contribute(props){
<AlignCenter className='mb15'>
<img alt="" style={{borderRadius:"50%",marginRight:"10px"}} src={getImageUrl(`/${item.image_url}`)} width="50px" height="50px"/>
<div>
<a href={item.id ? `/${item.login}` : `mailto:${item.email}`} className="font-16">{item.name}</a>
<a href={item.login ? `/${item.login}` : `mailto:${item.email}`} className="font-16">{item.name}</a>
<p className="font-12 color-grey-9">提交{item.contributions}{item.contribution_perc ? ` I 贡献占比${item.contribution_perc}` : ''}</p>
</div>
</AlignCenter>

View File

@ -61,18 +61,18 @@ function Tags(props) {
render: (txt, item) => {
return (
<div className="tagBranch">
<Link className="hover tagClass font-16" to={`/${owner}/${projectsId}/tree/${item.name}`}>{item.name}</Link>
<Link className="hover tagClass font-16" to={`/${owner}/${projectsId}/tree/${item.name}`} onClick={()=>{window.scrollTo(0,0)}}>{item.name}</Link>
<div className="tagModel">
{
item.tagger &&
<Tooltip placement="top" title={item.tagger.name}>
{
item.tagger.id ?
<Link className="mr3 tagModelImg" to={`/${item.tagger.login}`} >
<Link className="mr3 tagModelImg" to={`/${item.tagger.login}`} onClick={()=>{window.scrollTo(0,0)}}>
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt="" />
</Link>
:
<span className="mr3 tagModelImg" style={{ cursor: "default" }}>
<span className="mr3 tagModelImg" style={{ cursor: "default" }} onClick={()=>{window.scrollTo(0,0)}}>
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt="" />
</span>
}
@ -97,7 +97,7 @@ function Tags(props) {
<span style={{lineHeight: '30px'}}>
<img src={Tree} alt="sha" width={"16px"}/>
<Tooltip placement="top" title={`最后提交日期:${item.created_at_unix ? moment(item.created_at_unix * 1000).format('YYYY-MM-DD') : ''}`}>
<Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`}>{truncateCommitId(item.id)}</Link>
<Link className="hover color-blue" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`} onClick={()=>{window.scrollTo(0,0)}}>{truncateCommitId(item.id)}</Link>
</Tooltip>
<input type="text" id={`value${truncateCommitId(`${item.id}`)}`} value={`${truncateCommitId(item.id)}`}/>
</span>

View File

@ -75,7 +75,7 @@ function Index(props) {
className: "branchNameColumn",
render: (txt, item) => {
return (
<Link to={`/${owner}/${projectsId}/tree/${turnbar(txt)}`} className="task-hide">{txt}</Link>
<Link to={`/${owner}/${projectsId}/tree/${turnbar(txt)}`} onClick={()=>{window.scrollTo(0,0)}} className="task-hide">{txt}</Link>
)
}
},

View File

@ -71,16 +71,16 @@ function version(props) {
<span className={`${item.draft === "稳定" ?"versionTag green":"versionTag orange"}`}>{item.draft}</span>
<span className="color-grey-3 mt15 font-12">
<i className="iconfont icon-biaoqianicon mr3 font-14"></i>
<Link className="hover" to={`/${owner}/${projectsId}/tree/${item.tag_name}`} >{item.tag_name}</Link>
<Link className="hover" to={`/${owner}/${projectsId}/tree/${item.tag_name}`} onClick={()=>{window.scrollTo(0,0)}}>{item.tag_name}</Link>
</span>
<span className="color-grey-3 font-12">
<img src={Tree} width="16px" color="#333333" className="mr3"/>
<Link className="hover" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`}>{truncateCommitId(item.sha)}</Link>
<img src={Tree} width="16px" color="#333333" className="mr3" alt=""/>
<Link onClick={()=>{window.scrollTo(0,0)}} className="hover" to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`}>{truncateCommitId(item.sha)}</Link>
</span>
</span>
<div className="versionInfo_right">
<div className="versionName">
<Link to={`/${owner}/${projectsId}/tree/${item.tag_name}`} className="task-hide color-blue hover font-18">{item.name}</Link>
<Link onClick={()=>{window.scrollTo(0,0)}} to={`/${owner}/${projectsId}/tree/${item.tag_name}`} className="task-hide color-blue hover font-18">{item.name}</Link>
<span>
{data && data.user_admin_permission && type !== 2 && <Link to={{pathname:`/${owner}/${projectsId}/releases/${item.version_id}/update`,state:{"stable":item.draft==="稳定"}}} className="ml15"><i className="iconfont icon-a-bianji1 font-16 color-grey-6"></i></Link>}
{data && data.user_admin_permission && type !== 2 &&

View File

@ -100,4 +100,12 @@
}
}
}
}
.empBtn{
display: flex;
align-items: center;
justify-content: center;
margin-top: 60px;
padding-top: 20px;
border-top: 1px solid #F3F4F6;
}

View File

@ -56,6 +56,7 @@ class MergeItem extends Component {
<i className={`iconfont icon-hebingqingqiu1 font-14 mr3 i_${status}`}></i>
<Link
to={`/${owner}/${projectsId}/pulls/${item.pull_request_number || item.pull_request_id}`}
onClick={()=>{window.scrollTo(0,0)}}
className="hide-1 font-15 color-grey-3 fwb lineh-30 mr10"
style={{ maxWidth: "600px" }}
>

View File

@ -11,7 +11,7 @@ import { turnbar } from "educoder";
import axios from "axios";
import CheckProfile from '../Component/ProfileModal/Profile';
const Search = Input.Search;
const { Search } = Input;
/**
* issue_chosen:下拉的筛选列表,
* data:列表接口返回的所有数据,
@ -268,17 +268,14 @@ class merge extends Component {
return (
<div className="main mt20" style={{padding:"0px"}}>
<div className="topWrapper" style={{borderBottom:"none",padding:"20px"}}>
<div className="target-detail-search">
<Search
placeholder="输入关键字搜索合并请求"
enterButton
onSearch={this.searchFunc}
style={{ width: 300 }}
/>
</div>
<Search
placeholder="输入关键字搜索合并请求"
style={{ width: 354 , height : 32 }}
onSearch={this.searchFunc}
/>
{
data && data.user_admin_or_developer &&
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
<CheckProfile {...this.props} className="operateButton ml10" sureFunc={() => this.checkOperation()}>
+&nbsp;新建合并请求
</CheckProfile>
}

View File

@ -1,5 +1,6 @@
import React , { Component } from 'react';
import { Link } from "react-router-dom";
import None from '../Images/emp.png'
class Nodata extends Component{
render(){
const { _html, projectsId , owner , user_admin_or_developer , defaultBranch} = this.props;
@ -7,13 +8,19 @@ class Nodata extends Component{
<div className="none_panels">
<div>
<div className="mb15">
<i className="iconfont icon-hebingqingqiu font-80 ver-middle color-grey-b"></i>
{/* <i className="iconfont icon-hebingqingqiu font-80 ver-middle color-grey-b"></i> */}
<img src={None} alt=""/>
</div>
<h3>欢迎使用合并请求</h3>
<p className="font-20">欢迎使用合并请求</p>
<div className="color-grey-8">
合并请求可以帮助您与他人协作编写代码{ user_admin_or_developer && <span>在使用之前请先创建一个 <Link className="color-blue" to={`/${owner}/${projectsId}/compare/${defaultBranch}...${defaultBranch}`}>合并请求</Link></span> }
<div className="color-grey-8 mt10">
合并请求可以帮助您与他人协作编写代码请先创建一个合并请求
</div>
{ user_admin_or_developer &&
<div className="empBtn">
<span><Link className="operateButton" to={`/${owner}/${projectsId}/compare/${defaultBranch}...${defaultBranch}`}>合并请求</Link></span>
</div>
}
</div>
</div>
)

View File

@ -53,7 +53,7 @@ class Index extends Component {
checkFileName=(e)=>{
let value = (e.target.value);
//\需要单独判断
const str = '!@/:"“”<《》>|%';
const str = '!@:"“”<《》>|%';
let reg = /\\/g;
if(reg.test(value)){
this.setState({
@ -102,7 +102,7 @@ class Index extends Component {
placeholder="命名文件..."
onBlur={this.checkFileName}
/>
{checkName ? <p style={{color:"red",position:'absolute'}}>文件名不能包含下列任何字符\{`@/:"<>|%`}</p>:"" }
{checkName ? <p style={{color:"red",position:'absolute'}}>文件名不能包含下列任何字符\{`@:"<>|%`}</p>:"" }
</div>
<a onClick={this.CancelAddFile} className="color-blue">
取消

View File

@ -75,6 +75,7 @@ class UserSubmitComponent extends Component {
const { getDetail } = this.props;
getDetail && getDetail();
}
window.scrollTo(0,0);
let url = `/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;
this.props.history.push(url);
}
@ -112,6 +113,7 @@ class UserSubmitComponent extends Component {
this.setState({ isSpin: false });
if (result.data && result.data.status === 1) {
let b = currentBranch || branch;
window.scrollTo(0,0);
let url = `/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`;
this.props.history.push(url);
this.props.showNotification("文件修改成功!");
@ -267,6 +269,7 @@ class UserSubmitComponent extends Component {
type="primary grey"
onClick={() => {
this.props.history.push(`/${owner}/${projectsId}`);
window.scrollTo(0,0);
}}
className="mr20"
>

View File

@ -92,6 +92,7 @@ class UpdateMilepost extends Component {
}).then(result => {
if (result) {
this.setState({ isSpin: false })
window.scrollTo(0,0);
this.props.history.push(`/${owner}/${projectsId}/milestones/${meilid}`);
}

View File

@ -1,5 +1,5 @@
.screenWrap{
background:rgba(250,250,250,1);
background:#fafcff;
border-top:1px solid rgba(221,221,221,1);
border-bottom:1px solid rgba(221,221,221,1);
padding-left: 20px;

View File

@ -77,6 +77,7 @@ class NewMilepost extends Component {
}).then(result => {
if (result) {
this.setState({ isSpin: false })
window.scrollTo(0,0);
this.props.history.push(`/${owner}/${projectsId}/milestones`);
const { getDetail } = this.props;
getDetail && getDetail();

View File

@ -1,5 +1,5 @@
import React, { Component } from "react";
import { Form, Input, Checkbox, Select , Spin } from "antd";
import { Form, Input, Checkbox, Select , Spin, Button } from "antd";
import Title from '../Component/Title';
import {WhiteBack} from '../Component/layout';
import DivertModal from '../Divert/DivertModal';
@ -208,6 +208,7 @@ class Setting extends Component {
store_id: project_id,
store_identifier: projectsId
})
window.scrollTo(0,0);
this.props.showNotification("仓库删除成功!");
this.props.history.push(`/${owner}`);
})
@ -409,9 +410,9 @@ class Setting extends Component {
</div>
{
is_transfering ?
<a onClick={this.CancelDivertProject} className="red_deleteBtn">取消转移</a>
<Button onClick={this.CancelDivertProject} className="red_deleteBtn">取消转移</Button>
:
<a onClick={this.DivertProject} className="red_deleteBtn">转移</a>
<Button onClick={this.DivertProject} className="red_deleteBtn">转移</Button>
}
</div>
<div className="flex-a-center padding15-10">
@ -422,9 +423,9 @@ class Setting extends Component {
无法撤消且删除后与仓库关联的项目/任务/合并请求/版本发布等均会被删除
</p>
</div>
<a onClick={this.deleteProject} className="red_deleteBtn">
<Button onClick={this.deleteProject} className="red_deleteBtn">
删除本仓库
</a>
</Button>
</div>
</div>
</WhiteBack>

View File

@ -146,16 +146,23 @@ ul,ol,dl{
.normalBox{
border-radius: 4px;
border:1px solid #ddd;
// border:1px solid #ddd;
}
.normalBox-title{
padding:10px;
background-color: #f4f4f4;
line-height: 18px;
background-color: #fafcff;
border: 1px solid;
border-color: rgba(42, 97, 255, 0.23);
border-radius: 4px 4px 0px 0px;
padding:0px 20px;
height: 48px;
display: flex;
align-items: center;
font-size: 16px;
}
.none_panels{
text-align: center;
height: 400px;
min-height: 320px;
padding:40px 0px;
display: flex;
justify-content: center;
align-items: center;
@ -409,4 +416,22 @@ button.btngrey{
.newTab .newBtnImg {
right: -19px;
}
}
// 操作按钮-蓝色
.operateButton{
padding:0px 15px;
height:32px;
color: #fff!important;
cursor: pointer;
line-height: 30px;
background-color:rgba(70, 106, 255, 1);
border:1px solid rgba(70, 106, 255, 1);
border-radius: 4px;
display: block;
&:hover{
background-color:#708cff;
border-color:#708cff;
}
}

View File

@ -1,5 +1,8 @@
import React from 'react';
import './index.scss';
import dianzan from './image/dianzan.png';
import fork from './image/fork.png';
export default (props) => {
const { list } = props;
@ -16,9 +19,9 @@ export default (props) => {
<h3 className="search-item-title" dangerouslySetInnerHTML={{ __html: item.title }} onClick={() => { itemClick(item) }}></h3>
{item.type == 1 && <p>
<span className="search-icon"><i className="iconfont icon-dianjiliang mr3 font-12" />{item.watchersCount}</span>
<span className="search-icon"><i className="iconfont icon-kongxing mr3 font-16" />{item.praisesCount}</span>
<span className="search-icon"><i className="iconfont icon-fork mr3 font-16" />{item.forkedCount || 0}</span>
<span className="search-icon"><i className="iconfont icon-morenguanzhu_ICON mr3 font-14" />{item.watchersCount}</span>
<span className="search-icon"><i className="iconfont icon-dianzan11 mr3 font-18" />{item.praisesCount}</span>
<span className="search-icon"><i className="iconfont icon-fork2 mr3 font-14" />{item.forkedCount || 0}</span>
</p>}
</div >

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

View File

@ -1,6 +1,9 @@
.suit-main {
.search-head {
background: #eef2f5;
background-color: #eef2f5;
background-image: url(./image/bg.png);
background-size: 100% 100%;
height: 170px;
}
.search-box {
@ -21,7 +24,8 @@
}
}
.ant-tabs-top {
background: #eef2f5;
background: rgba(0,0,0,0);
margin-top: -44px;
}
.ant-tabs-tabpane {
background: #fff;
@ -29,6 +33,7 @@
.ant-tabs-bar {
width: 1200px;
margin: 0 auto;
border-bottom: none;
}
.ant-tabs-tab-active {
color: #000;
@ -54,7 +59,7 @@
margin-bottom: 30px!important;
li{
margin-right: 25px;
padding:0px 22px;
padding:0px 15px 0px 22px;
border:1px solid #5e6685;
border-radius: 4px;
height: 32px;