-1 ? "active" : ""}
+ className={pathname.indexOf("settings/labels") > -1 ? "active" : ""}
>
-
+
项目标签
@@ -153,19 +153,19 @@ class Index extends Component {
>
{/* 修改仓库信息 */}
(
)}
>
(
)}
>
(
)}
diff --git a/src/forge/users/GeneralView/Activity.jsx b/src/forge/users/GeneralView/Activity.jsx
index cefb45847..1f6b46d11 100644
--- a/src/forge/users/GeneralView/Activity.jsx
+++ b/src/forge/users/GeneralView/Activity.jsx
@@ -11,7 +11,7 @@ function Activity({list}) {
list.map((i,k)=>{
return(
-
+
{i.user_name}
diff --git a/src/forge/users/Index.jsx b/src/forge/users/Index.jsx
index 66c86ea3f..04c867f7e 100644
--- a/src/forge/users/Index.jsx
+++ b/src/forge/users/Index.jsx
@@ -24,7 +24,7 @@ export default withRouter(
secondRouter = props.location.pathname.split('/')[2];
}
- let userRouterArr = ['statistics', 'projects', 'notice', 'devops', 'organizes', 'info', 'watchers', 'fan_users', 'password'];
+ let userRouterArr = ['statistics', 'projects', 'notice', 'devops', 'organizes', 'info', 'following', 'followers', 'password'];
return (
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 11162c4ce..1cd3969de 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -84,10 +84,10 @@ class Infos extends Component {
this.setState({menuKey:"4",route_type:undefined});
}else if(pathname === `/${username}/organizes`){
this.setState({menuKey:"5",route_type:undefined});
- }else if(pathname === `/${username}/watchers`){
- this.setState({menuKey:undefined,route_type:"watchers"});
- }else if(pathname === `/${username}/fan_users`){
- this.setState({menuKey:undefined,route_type:"fan_users"});
+ }else if(pathname === `/${username}/following`){
+ this.setState({menuKey:undefined,route_type:"following"});
+ }else if(pathname === `/${username}/followers`){
+ this.setState({menuKey:undefined,route_type:"followers"});
}else{
this.setState({menuKey:undefined,route_type:undefined});
}
@@ -250,17 +250,17 @@ class Infos extends Component {
this.route_link("watchers")}
+ to={`/${user && user.login}/following`}
+ className={`with50 text-center pull-left ${route_type === "following" ? "text-primary" : ""}`}
+ onClick={() =>this.route_link("following")}
>
{current_user && user && user.login === current_user.login ? "我关注的" : "TA关注的"}
{user && user.watching_count}
this.route_link("fan_users")}
- className={`with50 text-center pull-left ${route_type === "fan_users" ? "text-primary" : ""}`}
+ to={`/${user && user.login}/followers`}
+ onClick={() =>this.route_link("followers")}
+ className={`with50 text-center pull-left ${route_type === "followers" ? "text-primary" : ""}`}
>
{current_user && user && user.login === current_user.login ? "关注我的" : "关注TA的"}
{user && user.watched_count}
@@ -309,7 +309,7 @@ class Infos extends Component {
{user && (
{
return ;
}}
@@ -321,7 +321,7 @@ class Infos extends Component {
}}
>
{
return ;
}}
diff --git a/src/forge/users/common_lists.js b/src/forge/users/common_lists.js
index 5e77ddf55..aaa7545d2 100644
--- a/src/forge/users/common_lists.js
+++ b/src/forge/users/common_lists.js
@@ -22,8 +22,8 @@ class CommonList extends Component {
};
get_watchers = () => {
- const { login, userType } = this.props;
- const url = `/users/${login}/${userType}.json`;
+ const { userType, match: { params: { username } } } = this.props;
+ const url = `/users/${username}/${userType}.json`;
const { page, limit, search } = this.state;
this.setState({
isSpin: true,
diff --git a/src/forge/users/fan_users.js b/src/forge/users/fan_users.js
index c70630b17..327481762 100644
--- a/src/forge/users/fan_users.js
+++ b/src/forge/users/fan_users.js
@@ -3,10 +3,10 @@ import CommonLists from "./common_lists"
class FanUsers extends Component {
render() {
- const {user, current_user , fetchUser} = this.props
+ const {user, current_user , match, fetchUser} = this.props
return (
- {user && user.login && }
+ {user && user.login && }
);
}
diff --git a/src/forge/users/watch_users.js b/src/forge/users/watch_users.js
index 76a6e8e63..cebc3e86c 100644
--- a/src/forge/users/watch_users.js
+++ b/src/forge/users/watch_users.js
@@ -2,7 +2,7 @@ import React, { Component } from "react";
import CommonLists from "./common_lists"
class WatcherUsers extends Component {
render() {
- const {user, current_user , fetchUser } = this.props;
+ const {user, current_user , match, fetchUser } = this.props;
return (
user && user.login &&
);
}