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}
@@ -308,7 +308,7 @@ class Infos extends Component {
{user && (
{
return ;
}}
@@ -320,7 +320,7 @@ class Infos extends Component {
}}
>
{
return ;
}}
diff --git a/src/forge/users/common_lists.js b/src/forge/users/common_lists.js
index c9d78075c..a9955363c 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 &&
);
}
From 4e08bf6fe32bbab3928fa23bdfac35c335f33fe9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com>
Date: Fri, 3 Sep 2021 14:39:21 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1labels?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Settings/Branch.js | 2 +-
src/forge/Settings/BranchRule.jsx | 2 +-
src/forge/Settings/Index.js | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/forge/Settings/Branch.js b/src/forge/Settings/Branch.js
index ed3728a22..3e19f37e7 100644
--- a/src/forge/Settings/Branch.js
+++ b/src/forge/Settings/Branch.js
@@ -88,7 +88,7 @@ export default ((props)=>{
// 跳转
function settingRule(protectBranch){
- props.history.push(`/${owner}/${projectsId}/settings/branch/${protectBranch}`);
+ props.history.push(`/${owner}/${projectsId}/settings/branches/${protectBranch}`);
}
// 翻页
diff --git a/src/forge/Settings/BranchRule.jsx b/src/forge/Settings/BranchRule.jsx
index d131372f5..85b9bf20c 100644
--- a/src/forge/Settings/BranchRule.jsx
+++ b/src/forge/Settings/BranchRule.jsx
@@ -290,7 +290,7 @@ export default Form.create()(
{
- history.push(`/${owner}/${projectsId}/settings/branch`);
+ history.push(`/${owner}/${projectsId}/settings/branches`);
}}
>
取消
diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js
index 92b60aaf6..3ebb5b49a 100644
--- a/src/forge/Settings/Index.js
+++ b/src/forge/Settings/Index.js
@@ -91,17 +91,17 @@ class Index extends Component {
}
>
-
+
分支设置
-1 ? "active" : ""}
+ className={pathname.indexOf("settings/labels") > -1 ? "active" : ""}
>
-
+
项目标签
@@ -153,19 +153,19 @@ class Index extends Component {
>
{/* 修改仓库信息 */}
(
)}
>
(
)}
>
(
)}