From 4621a75ec8062946d634b503ed137b14dd2f22ca Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 3 Sep 2021 14:10:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index 986b9a84b..a08c3d3bc 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -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( - 新建镜像项目 - 新建托管项目 + + {this.props.history.push('/projects/mirror/new')}}>新建镜像项目 + + + {this.props.history.push('/projects/deposit/new')}}>新建托管项目 + ) } From 7fb7dbe6876fff422903b4f3600d352ae91af17d Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 3 Sep 2021 14:46:06 +0800 Subject: [PATCH 2/3] issue --- src/forge/UsersList/focus_button.js | 1 - src/forge/UsersList/user_list.js | 5 ++--- src/forge/users/Infos.js | 1 + src/forge/users/Team.jsx | 4 ++-- src/forge/users/common_lists.js | 3 ++- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/forge/UsersList/focus_button.js b/src/forge/UsersList/focus_button.js index 4fb62cba3..a2e93bdec 100644 --- a/src/forge/UsersList/focus_button.js +++ b/src/forge/UsersList/focus_button.js @@ -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); } diff --git a/src/forge/UsersList/user_list.js b/src/forge/UsersList/user_list.js index a0d25d6b9..64cc948dd 100644 --- a/src/forge/UsersList/user_list.js +++ b/src/forge/UsersList/user_list.js @@ -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) ); } } diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index 0e56aaef2..11162c4ce 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -243,6 +243,7 @@ class Infos extends Component { id={user.login} fontClass={"font-14 ml5"} starText={"关注TA"} + notReset={true} /> )} diff --git a/src/forge/users/Team.jsx b/src/forge/users/Team.jsx index 4cebde63f..2252d3efd 100644 --- a/src/forge/users/Team.jsx +++ b/src/forge/users/Team.jsx @@ -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){

{ - checkIfLogin() && + current_user && current_user.login === username && {props.history.push('/organize/new')}}>新建组织 } diff --git a/src/forge/users/common_lists.js b/src/forge/users/common_lists.js index c9d78075c..5e77ddf55 100644 --- a/src/forge/users/common_lists.js +++ b/src/forge/users/common_lists.js @@ -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} /> ) : ( From 3fce9a99adf0947637f8182a5770c5a7f8276ece Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 3 Sep 2021 14:57:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=B4=E9=83=A8=E5=A7=93=E5=90=8D?= =?UTF-8?q?=E8=BF=87=E9=95=BF=EF=BC=8C=E7=9C=81=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Head/Header.js | 2 +- src/forge/Head/header.scss | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index b05b8d846..d04f578ed 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -260,7 +260,7 @@ class NewHeader extends Component { return(

- {current_user && current_user.username} + {current_user && current_user.username} { personal && personal.length > 0 && personal.map((item,key)=>{ diff --git a/src/forge/Head/header.scss b/src/forge/Head/header.scss index 0246658a9..fc8ca9d62 100644 --- a/src/forge/Head/header.scss +++ b/src/forge/Head/header.scss @@ -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;