issue-修改‘

This commit is contained in:
caishi 2021-11-30 11:11:25 +08:00
parent f4055e50e2
commit ff9beb0949
7 changed files with 11 additions and 8 deletions

View File

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

View File

@ -2,7 +2,7 @@ import React , { Component } from 'react';
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
class Nodata extends Component{ class Nodata extends Component{
render(){ render(){
const { _html, projectsId , owner } = this.props; const { _html, projectsId , owner , user_admin_or_member} = this.props;
return( return(
<div className="none_panels"> <div className="none_panels">
<div> <div>
@ -12,7 +12,7 @@ class Nodata extends Component{
<h3>欢迎使用合并请求</h3> <h3>欢迎使用合并请求</h3>
<div className="color-grey-8"> <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> </div>
</div> </div>

View File

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

View File

@ -49,7 +49,7 @@ class OrderItem extends Component {
return ( return (
item && item &&
<div className="issueItem"> <div className="issueItem">
{current_user && current_user.login && checkbox} {(current_user && current_user.login) && user_admin_or_member && checkbox}
<div className="flex-1"> <div className="flex-1">
<p className="mb10 df" style={{alignItems:"center"}}> <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> <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 { data } = this.state;
const { projectsId , owner } = this.props.match.params; const { projectsId , owner } = this.props.match.params;
if(data && data.user_admin_or_member){ if(data && data.user_admin_or_member){
window.open(`/${owner}/${projectsId}/issues/new`,'_blank'); this.props.history.push(`/${owner}/${projectsId}/issues/new`,'_blank');
}else{ }else{
this.props.showLoginDialog(`/${owner}/${projectsId}/issues/new`); this.props.showLoginDialog(`/${owner}/${projectsId}/issues/new`);
} }

View File

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

View File

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