Merge pull request 'issue修改' (#43) from caishi/forgeplus-react:feature_router into feature_router
This commit is contained in:
commit
03a8e79382
|
@ -260,7 +260,7 @@ class NewHeader extends Component {
|
|||
return(
|
||||
<Menu className="currentMenu">
|
||||
<Menu.Item>
|
||||
<span title={current_user && current_user.username}>{current_user && current_user.username}</span>
|
||||
<span className="currentName" title={current_user && current_user.username}>{current_user && current_user.username}</span>
|
||||
</Menu.Item>
|
||||
{
|
||||
personal && personal.length > 0 && personal.map((item,key)=>{
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
width: 120px;
|
||||
text-align: center;
|
||||
padding:0px;
|
||||
.currentName{
|
||||
padding:0px 8px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
}
|
||||
li{
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Menu, Input , Spin, Pagination , Popover , Select } from 'antd';
|
||||
import Slider from "react-slick";
|
||||
import { getImageUrl } from 'educoder';
|
||||
|
@ -13,6 +12,8 @@ import axios from 'axios';
|
|||
import img_new from '../Images/new.png';
|
||||
import img_array from '../Images/array.png';
|
||||
import banner from '../Images/banner_list.jpg';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const Search = Input.Search;
|
||||
|
||||
class Index extends Component {
|
||||
|
@ -255,8 +256,12 @@ class Index extends Component {
|
|||
newItem = ()=>{
|
||||
return(
|
||||
<Menu>
|
||||
<Menu.Item key="created_mirror"><Link to={`/projects/mirror/new`}>新建镜像项目</Link></Menu.Item>
|
||||
<Menu.Item key="created_deposit"><Link to={`/projects/deposit/new`}>新建托管项目</Link></Menu.Item>
|
||||
<Menu.Item key="created_mirror">
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/mirror/new')}}>新建镜像项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="created_deposit">
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/deposit/new')}}>新建托管项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ function FocusButton({is_watch , fontClass, starText, is_block , id , successFun
|
|||
}).then((result) => {
|
||||
if (result && result.data.status === 0) {
|
||||
successFunc && successFunc();
|
||||
console.log(notReset);
|
||||
if(notReset){
|
||||
setWatchFlag(!watchFlag);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import "./list.css";
|
|||
class UserList extends Component {
|
||||
|
||||
renderList = (users, userClass, current_user, type_title , successFunc , notReset) => {
|
||||
console.log("user:",notReset)
|
||||
if (users && users.length > 0) {
|
||||
return users.map((item, key) => {
|
||||
return (
|
||||
|
@ -54,9 +53,9 @@ class UserList extends Component {
|
|||
}
|
||||
}
|
||||
render() {
|
||||
const { users, userClass, current_user , type_title , successFunc , notReset } = this.props;
|
||||
const { users, userClass, current_user , type_title , successFunc , notReset , title_type } = this.props;
|
||||
return (
|
||||
this.renderList(users, userClass, current_user, type_title , successFunc , notReset)
|
||||
this.renderList(users, userClass, current_user, type_title , successFunc , notReset , title_type)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,6 +243,7 @@ class Infos extends Component {
|
|||
id={user.login}
|
||||
fontClass={"font-14 ml5"}
|
||||
starText={"关注TA"}
|
||||
notReset={true}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -15,7 +15,7 @@ function Team(props){
|
|||
const [ sort_direction , setSort_direction ] = useState("asc");
|
||||
const [ sort_by ,setSort_by ] = useState("created_at");
|
||||
const [ search ,setSearch ] = useState(undefined);
|
||||
const { checkIfLogin , showLoginDialog } = props;
|
||||
const { checkIfLogin , showLoginDialog , current_user } = props;
|
||||
const { username } = props.match.params;
|
||||
useEffect(()=>{
|
||||
if(username){
|
||||
|
@ -57,7 +57,7 @@ function Team(props){
|
|||
</div>
|
||||
<p>
|
||||
{
|
||||
checkIfLogin() &&
|
||||
current_user && current_user.login === username &&
|
||||
<CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
|
||||
}
|
||||
<Dropdown overlay={menu}>
|
||||
|
|
|
@ -116,7 +116,8 @@ class CommonList extends Component {
|
|||
type_title={'关注列表'}
|
||||
current_user={current_user}
|
||||
successFunc={this.successFunc}
|
||||
notReset={userType === "watch_users"?false:true}
|
||||
notReset={(userType === "watch_users" && title_type === "我") ? false : true}
|
||||
title_type={title_type}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
|
Loading…
Reference in New Issue