Merge pull request 'issue修改' (#297) from caishi/forgeplus-react:gitlink_server into gitlink_server

This commit is contained in:
xxq250 2021-11-30 11:37:41 +08:00
commit 0991ba4698
10 changed files with 14 additions and 11 deletions

View File

@ -25,7 +25,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student'
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {

View File

@ -171,7 +171,7 @@ function About(props, ref) {
<div className="noOperation">DevOps开启功能暂未对项目创建者以外的角色开放可以联系项目创建者进行开启开启后便可查看构建信息</div>:""
}
<a href={"https://forum.trustie.net/forums/3110/detail"} target="_blank" style={{ color: "#5091FF"}}>
了解什么是引擎
了解什么是DevOps
</a>
<a href={"https://forum.trustie.net/forums/3080/detail"} target="_blank" style={{ color: "#5091FF"}}>
如何使用引擎Engine功能

View File

@ -66,7 +66,7 @@ export default ((props)=>{
{/* 原本的两种合为一个 */}
<Route path="/:owner/:projectsId/devops"
render={
(p) =>{return( p.location.state.open_devops?<Dispose {...props} {...p}/>:<About {...props} {...p}/>)}
(p) =>{return( p.location && p.location.state && p.location.state.open_devops?<Dispose {...props} {...p}/>:<About {...props} {...p}/>)}
}
></Route>
</Switch>

View File

@ -197,7 +197,7 @@ function CoderDepot(props){
let ele = document.getElementById("ptxt");
if(ele){
let h = ele.offsetHeight;
if( h > 35 ) setHideBtn(true);
if( h > 36 ) setHideBtn(true);
}
}
},[projectDetail,lastCommit])

View File

@ -2,7 +2,7 @@ import React , { Component } from 'react';
import { Link } from "react-router-dom";
class Nodata extends Component{
render(){
const { _html, projectsId , owner } = this.props;
const { _html, projectsId , owner , user_admin_or_member} = this.props;
return(
<div className="none_panels">
<div>
@ -12,7 +12,7 @@ class Nodata extends Component{
<h3>欢迎使用合并请求</h3>
<div className="color-grey-8">
合并请求可以帮助您与他人协作编写代码在使用之前请先创建一个 <Link className="color-blue" to={`/${owner}/${projectsId}/compare/master...master`}>合并请求</Link>
合并请求可以帮助您与他人协作编写代码{ user_admin_or_member && <span>在使用之前请先创建一个 <Link className="color-blue" to={`/${owner}/${projectsId}/compare/master...master`}>合并请求</Link></span> }
</div>
</div>
</div>

View File

@ -252,7 +252,7 @@ class Detail extends Component {
添加于 {data && data.created_at}
</span>
{data && data.user_permission ? (
<span className="pull-right 123123">
<span className="pull-right">
<a className="color-blue fr" onClick={this.copydetail}>
复制
</a>

View File

@ -49,7 +49,7 @@ class OrderItem extends Component {
return (
item &&
<div className="issueItem">
{current_user && current_user.login && checkbox}
{(current_user && current_user.login) && user_admin_or_member && checkbox}
<div className="flex-1">
<p className="mb10 df" style={{alignItems:"center"}}>
<Link to={`/${owner}/${projectsId}/issues/${item.id}`} title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link>

View File

@ -348,7 +348,7 @@ class order extends Component {
const { data } = this.state;
const { projectsId , owner } = this.props.match.params;
if(data && data.user_admin_or_member){
window.open(`/${owner}/${projectsId}/issues/new`,'_blank');
this.props.history.push(`/${owner}/${projectsId}/issues/new`,'_blank');
}else{
this.props.showLoginDialog(`/${owner}/${projectsId}/issues/new`);
}

View File

@ -1,7 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Modal , Checkbox , Spin , Input } from 'antd';
import Axios from 'axios';
import { Link } from 'react-router-dom';
import CheckProfile from '../../Component/ProfileModal/Profile';
const { Search } = Input;
@ -113,6 +112,9 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
//
function onSearch(params) {
if(params === search && params === ""){
return;
}
setCopyAllList(list);
value && value.length > 0 ? saveList(value) : setCopyList([]);
setPage(1);

View File

@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
import axios from 'axios';
import Box from './ConcentrateBox';
function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfile}) {
function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfile,history}) {
const [ list , setList ] = useState(undefined);
const [ visible , setVisible ] = useState(false);
const [ value , setValue ] = useState([]);
@ -53,6 +53,7 @@ function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfi
choosed={value}
completeProfile={completeProfile}
showCompeleteDialog={showCompeleteDialog}
history={history}
/>
{
list && list.length>0 &&