diff --git a/src/AppConfig.js b/src/AppConfig.js index 01e04672f..825a2a3be 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Index.js b/src/forge/Index.js index 1508660e9..c2e369169 100644 --- a/src/forge/Index.js +++ b/src/forge/Index.js @@ -12,11 +12,7 @@ import Loadable from "react-loadable"; import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; -//404页面 -const Shixunnopage = Loadable({ - loader: () => import('../modules/404/Shixunnopage'), - loading: Loading, -}) + const ProjectNew = Loadable({ loader: () => import("./New/Index"), loading: Loading, diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 99b3803b5..3303d42c3 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -512,7 +512,7 @@ class Detail extends Component { { watchers_count > 0 ? platform ? - + {watchers_count} : @@ -729,7 +729,7 @@ class Detail extends Component { (props) => () } > - () } diff --git a/src/forge/Notice/UndoEvent.jsx b/src/forge/Notice/UndoEvent.jsx index 27f4d83ab..18cb6d4a3 100644 --- a/src/forge/Notice/UndoEvent.jsx +++ b/src/forge/Notice/UndoEvent.jsx @@ -72,7 +72,7 @@ function UndoEvent(props){

- {i.user && i.user.name} + {i.user && i.user.name} {i.time_ago}

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 { > {/* 修改仓库信息 */} ( )} > ( )} > ( )} 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 && ); }