From da7ff8c7492bd74331c547f8d054fe0b1acbfef5 Mon Sep 17 00:00:00 2001 From: yuzhantian <2205129388@qq.com> Date: Sat, 9 Oct 2021 16:39:47 +0800 Subject: [PATCH 01/73] =?UTF-8?q?refactor:=20=E5=90=88=E5=B9=B6=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=B7=AF=E7=94=B1=E6=94=B9=E9=80=A0=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=95=B0=E9=87=8Fbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Activity/ActivityItem.js | 2 +- src/forge/Main/Detail.js | 12 +- src/forge/Merge/MergeItem.js | 4 +- src/forge/Merge/MergeLinkFooter.jsx | 192 ++++++++++++++++++++++++ src/forge/Merge/MessageCount.js | 20 +-- src/forge/Merge/merge_form.js | 4 +- src/forge/comments/children_comments.js | 18 ++- src/forge/comments/comments.js | 9 +- 8 files changed, 236 insertions(+), 25 deletions(-) create mode 100644 src/forge/Merge/MergeLinkFooter.jsx diff --git a/src/forge/Activity/ActivityItem.js b/src/forge/Activity/ActivityItem.js index 2b1ad3c8c..48a72e797 100644 --- a/src/forge/Activity/ActivityItem.js +++ b/src/forge/Activity/ActivityItem.js @@ -27,7 +27,7 @@ class ActivityItem extends Component { : // 如果是合并请求

- {item.name} + {item.name} {item.trend_type}

} diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index a1a741496..868ad06fb 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -727,7 +727,17 @@ class Detail extends Component { (props) => () } > - () + } + > + () + } + > + () } diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js index 884c50feb..eaa6ba0e0 100644 --- a/src/forge/Merge/MergeItem.js +++ b/src/forge/Merge/MergeItem.js @@ -62,7 +62,7 @@ class MergeItem extends Component {

@@ -175,7 +175,7 @@ class MergeItem extends Component { {item.journals_count ? ( {item.journals_count} diff --git a/src/forge/Merge/MergeLinkFooter.jsx b/src/forge/Merge/MergeLinkFooter.jsx new file mode 100644 index 000000000..104d2168b --- /dev/null +++ b/src/forge/Merge/MergeLinkFooter.jsx @@ -0,0 +1,192 @@ +import React, { Component } from 'react'; +import { Tabs, Spin } from 'antd'; +import { Link } from 'react-router-dom'; +import axios from 'axios'; + +import Commits from './Commits'; +import Comments from '../comments/comments'; +import Files from './Files'; + +import '../Order/order.css'; +import './merge.css'; + +const { TabPane } = Tabs; + +class MergeFooter extends Component { + constructor(props) { + super(props); + this.state = { + commitsData: undefined, + filesData: undefined, + isSpin: false, + activeKey: '1', + commitCount: 0, + filesCount: 0, + // 总评论数量,包含回复 + commentsTotalCount: 0, + }; + } + componentDidMount() { + this.Init(); + } + + componentDidUpdate(prevProps) { + // 解决切换tab后浏览器回退不刷新的问题、点击tab后url变化但tab未切换的问题 + const newPathname = this.props.location.pathname; + const prevPathname = prevProps.location.pathname; + if (newPathname !== prevPathname) { + this.Init(); + } + } + + Init = () => { + const { data, location, match } = this.props; + const { pathname } = location; + const { projectsId, owner, mergeId } = match.params; + + let activeKey = '1'; + if (pathname.indexOf('commits') > -1) { + activeKey = '2'; + this.getCommit(owner, projectsId, mergeId); + } else if (pathname.indexOf('files') > -1) { + activeKey = '3'; + this.getFile(owner, projectsId, mergeId); + } + this.setState({ + activeKey: activeKey, + commitCount: data && data.commits_count, + filesCount: data && data.files_count, + }); + }; + + getCommit = (owner, projectsId, mergeId) => { + this.setState({ isSpin: true }); + const url = `/${owner}/${projectsId}/pulls/${mergeId}/commits.json`; + axios + .get(url) + .then((result) => { + if (result) { + this.setState({ + commitsData: result.data.commits, + commitCount: result.data.commits_count, + }); + } + this.setState({ isSpin: false }); + }) + .catch((error) => { + this.setState({ isSpin: false }); + }); + }; + + getFile = (owner, projectsId, mergeId) => { + this.setState({ isSpin: true }); + const url = `/${owner}/${projectsId}/pulls/${mergeId}/files.json`; + axios + .get(url) + .then((result) => { + if (result) { + this.setState({ + filesData: result.data, + filesCount: result.data.files_count, + }); + } + this.setState({ isSpin: false }); + }) + .catch((error) => { + this.setState({ isSpin: false }); + }); + }; + + render() { + const { projectsId, owner, mergeId } = this.props.match.params; + + const { order_id, data = {} } = this.props; + const { + isSpin, + activeKey, + filesCount, + commitCount, + filesData, + commitsData, + } = this.state; + + // 评论数量优先取Comment组件中列表接口返回的,其次取合并请求详情接口中的,都没有取默认值0 + const commentsTotalCount = + this.state.commentsTotalCount || + (data.comments_total_count && parseInt(data.comments_total_count, 10)) || + 0; + + return ( +

+ + + + 评论 + {commentsTotalCount && ( + {commentsTotalCount} + )} + + } + key="1" + > + { + this.setState({ commentsTotalCount: commentsCount || 0 }); + }} + {...this.props} + /> + + + 提交 + {commitCount > 0 && ( + {commitCount} + )} + + } + key="2" + > + {commitsData && ( + + )} + + + 文件 + {filesCount > 0 && ( + {filesCount} + )} + + } + key="3" + > + + + + +
+ ); + } +} +export default MergeFooter; diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index b064e3c2f..fc021f813 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -1,7 +1,6 @@ import React, { Component } from "react"; import { Tabs } from 'antd'; import { Link } from "react-router-dom"; -import { AlignCenter } from '../Component/layout'; import axios from "axios"; import { getImageUrl } from "educoder"; import { @@ -11,7 +10,6 @@ import { Dropdown, Icon, Menu, - Select, Tag, Button, Alert, @@ -19,9 +17,8 @@ import { import "./merge.css"; import RenderHtml from "../../components/render-html"; import "../Order/order.css"; -import MergeFooter from "./merge_footer"; +import MergeLinkFooter from "./MergeLinkFooter"; -const Option = Select.Option; const TextArea = Input.TextArea; function turnbar(str){ @@ -283,13 +280,13 @@ class MessageCount extends Component { conflict_files && conflict_files.length>0 &&

如下文件有代码冲突:

-

+

{ conflict_files.map((i,k)=>{ - return

{i}

+ return

{i}

}) } -

+
} @@ -543,7 +540,7 @@ class MessageCount extends Component { onChange={this.changbodypr} /> -

@@ -558,19 +555,18 @@ class MessageCount extends Component { 取消 -

+ )} - + > ) : ( "" diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js index 5df9794bb..1f03a433e 100644 --- a/src/forge/Merge/merge_form.js +++ b/src/forge/Merge/merge_form.js @@ -195,7 +195,7 @@ class MergeForm extends Component { isSpin: false, }); this.props.history.push( - `/${owner}/${projectsId}/pulls/${mergeId}/Messagecount` + `/${owner}/${projectsId}/pulls/${mergeId}` ); } else { this.setState({ @@ -287,7 +287,7 @@ class MergeForm extends Component { type="default" className="ml30" onClick={()=>{ - this.props.history.push(merge_type === "new" ? `/${owner}/${projectsId}/pulls` : `/${owner}/${projectsId}/pulls/${mergeId}/detail`) + this.props.history.push(merge_type === "new" ? `/${owner}/${projectsId}/pulls` : `/${owner}/${projectsId}/pulls/${mergeId}`) }} > 取消 diff --git a/src/forge/comments/children_comments.js b/src/forge/comments/children_comments.js index 450a30f13..75330161a 100644 --- a/src/forge/comments/children_comments.js +++ b/src/forge/comments/children_comments.js @@ -17,6 +17,7 @@ class children_comments extends Component { page: 1, journal_spin: false, search_count: 0, + isSpin: false, }; } @@ -71,6 +72,9 @@ class children_comments extends Component { .then((result) => { if (result) { this.getChildrenJournals(); + // 删除回复后,如果需手动调用父组件查询评论列表的接口,以保持角标(评论数量)的一致(合并请求页面), + // 否则直接查顶级评论列表,否则只查询当前子评论列表(易修页面) + this.props.refreshCommentList && this.props.refreshCommentList(); } }) .catch((error) => { @@ -80,9 +84,15 @@ class children_comments extends Component { // 翻页 ChangePage = (page) => { - this.state.page = page; - this.state.isSpin = true; - this.getChildrenJournals(); + // this.state.page = page; + // this.state.isSpin = true; + // 使用回调的写法,这样在getChildrenJournals中使用的就是最新的state + this.setState({ + page, + isSpin: true + }, () => { + this.getChildrenJournals(); + }); }; commentCtx = (v) => { @@ -183,7 +193,7 @@ class children_comments extends Component { size="large" loading={isSpin} dataSource={journalsdata.issue_journals} - renderItem={(item) => {this.renderList(item)}} + renderItem={(item) => {this.renderList(item)}} /> {this.Paginations()} diff --git a/src/forge/comments/comments.js b/src/forge/comments/comments.js index c27bb12af..ceebb653c 100644 --- a/src/forge/comments/comments.js +++ b/src/forge/comments/comments.js @@ -151,6 +151,8 @@ class comments extends Component { isSpin: false, fileList: undefined, }); + const { updateCommentsNum } = this.props; + updateCommentsNum && updateCommentsNum(result.data.journals_total_count); } }) .catch((error) => { @@ -372,7 +374,7 @@ class comments extends Component { const renderList = (item) => { return ( -
+
@@ -500,7 +503,7 @@ class comments extends Component { loading={isSpin} header="" dataSource={journalsdata.issue_journals} - renderItem={(item) => {renderList(item)}} + renderItem={(item) => {renderList(item)}} /> )} {this.Paginations()} @@ -558,7 +561,7 @@ class comments extends Component { header="" dataSource={journalsdata.issue_journals} renderItem={(item) => ( - {renderList(item)} + {renderList(item)} )} /> )} -- 2.34.1 From d7ab95eccc71eaa5cd0265bd690bfd7bb037fbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 11 Oct 2021 11:28:41 +0800 Subject: [PATCH 02/73] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/Files.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index 172038b21..87260cdd8 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -1,7 +1,7 @@ -import React ,{useEffect,useRef,useState } from 'react'; +import React ,{useEffect,useState } from 'react'; import { truncateCommitId } from '../common/util'; import { AlignCenter , FlexAJ } from '../Component/layout'; -import { Button, Tooltip,Progress, Popover, Anchor } from 'antd'; +import { Tooltip,Progress } from 'antd'; import './merge.css'; import './Index.scss'; @@ -16,6 +16,10 @@ function Files({ data,history,owner,projectsId , parentsSha }){ } },[data]); + useEffect(()=>{ + document.addEventListener('click',()=>{setIsOpen(false)}) + }) + function showDown(flag,index,isBin){ if(!isBin){ var lists = files.concat(); @@ -63,7 +67,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){ ) return( -
+
{e.nativeEvent.stopImmediatePropagation()}}>
{setIsOpen(!isOpen)}}> -- 2.34.1 From 1b9602df770e3e4305912fe2d4455dabdb67dd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 11 Oct 2021 16:39:40 +0800 Subject: [PATCH 03/73] issue --- src/forge/Main/Diff.jsx | 2 +- src/forge/Main/version/version.js | 6 +++--- src/forge/Team/List.jsx | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index 17535e43b..67bb1cb1c 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -85,7 +85,7 @@ export default (props) => {
{commit && commit.message && -
{commit.message}
+
').replaceAll('\n\r','
').replaceAll('\n','
')}} className="task-hide">
} {data.branch}
diff --git a/src/forge/Main/version/version.js b/src/forge/Main/version/version.js index 68cfd7746..2896899fc 100644 --- a/src/forge/Main/version/version.js +++ b/src/forge/Main/version/version.js @@ -15,10 +15,9 @@ function version(props) { const [ releases , setReleases ] = useState(undefined); const [ isSpin , setIsSpin ] = useState(true); const { projectsId ,owner } = props.match.params; - const { isManager, isDeveloper, location , user } = props; + const { location } = props; const type = props.projectDetail && props.projectDetail.type; const turnFromNew = location && location.query && location.query.turnFromNew; - const current_user_login = user && user.login; useEffect(()=>{ getIssueList(); },[]) @@ -34,7 +33,6 @@ function version(props) { setReleases(result.data.releases); setIsSpin(false); } - }).catch((error) => { console.log(error); }) @@ -130,6 +128,8 @@ function version(props) { addFunc={addFunc} /> ) + } else{ + return (
) } } diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx index ea23ab079..48a19c227 100644 --- a/src/forge/Team/List.jsx +++ b/src/forge/Team/List.jsx @@ -19,7 +19,6 @@ function List(props){ const [ search , setSearch ] = useState(undefined); const [ page , setPage ] = useState(1); const [ sortBy , setSortBy ] = useState("updated_on"); - const [ sortDirection , setSortDirection ] = useState("asc"); const OIdentifier = props.match.params.OIdentifier; const organizeDetail = props.organizeDetail; @@ -37,7 +36,7 @@ function List(props){ params:{ search,page,limit, sort_by:sortBy, - sort_direction:sortDirection + sort_direction:"desc" } }).then(result=>{ if(result && result.data){ -- 2.34.1 From f6c5fd755019fe3d3bd51f5e9c82e24fd66b740e Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 16:29:09 +0800 Subject: [PATCH 04/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 4 ++-- src/forge/Main/tag/Index.scss | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 88cca13b5..66e6f24cf 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -7,7 +7,7 @@ import { truncateCommitId } from '../../common/util'; import './Index.scss'; import Tree from '../img/tree.png' import moment from 'moment'; - +import Loading from '../../../Loading'; function Tags(props) { @@ -59,7 +59,7 @@ function Tags(props) { return ( 提交ID - {truncateCommitId(item.commit && item.commit.sha)} + {truncateCommitId(item.id)} ) } diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 3bd487db6..5ce43cf24 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -4,6 +4,7 @@ tr th{ background-color: #fff; padding:5px 0px; + width: 172px; .ant-table-column-title{ font-size: 16px; font-weight: 500; @@ -20,6 +21,9 @@ padding:0px; height: 69px; line-height: 69px; + div{ + padding-left: 69px; + } } &:last-child{ td{ -- 2.34.1 From 08b5f7edc0e2701664b8deb5b71f24e623884f35 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 17:24:28 +0800 Subject: [PATCH 05/73] =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=9C=86=E7=82=B9=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index a19bd80da..f2f7cd2b4 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -224,7 +224,7 @@ height: 8px; width: 8px; left: 0px; - top:10px + top:8px; } &>span{ padding-left: 15px; -- 2.34.1 From 756e3f041632a5cb310d3a14434e473c3a255bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 11 Oct 2021 17:41:58 +0800 Subject: [PATCH 06/73] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2-=E6=8F=90=E4=BA=A4md=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Diff.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index 67bb1cb1c..a50c16c71 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -6,6 +6,7 @@ import { getImageUrl } from 'educoder'; import Files from '../Merge/Files'; import Tree from "./img/tree.png"; import User from "../Component/User"; +import RenderHtml from "../../components/render-html"; import axios from "axios"; import { Link } from "react-router-dom"; @@ -85,7 +86,7 @@ export default (props) => {
{commit && commit.message && -
').replaceAll('\n\r','
').replaceAll('\n','
')}} className="task-hide">
+ } {data.branch}
-- 2.34.1 From dcb597ea3761be5d0f58e7723c991835cf2579a5 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 17:53:30 +0800 Subject: [PATCH 07/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 18 ++++++++++++++---- src/forge/Main/tag/Index.scss | 6 ++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 66e6f24cf..023adb449 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -1,17 +1,17 @@ import React,{ useEffect , useState } from 'react'; import SubMenu from '../sub/SubMenu'; -import { Table , Tooltip } from 'antd'; +import { Table , Tooltip , Spin } from 'antd'; import axios from 'axios'; import { Link } from 'react-router-dom'; import { truncateCommitId } from '../../common/util'; import './Index.scss'; import Tree from '../img/tree.png' import moment from 'moment'; -import Loading from '../../../Loading'; function Tags(props) { const [ source , setSource ] = useState([]); + const [ isSpin , setIsSpin ] = useState(true); const { projectsId , owner } = props.match.params; @@ -21,6 +21,7 @@ function Tags(props) { axios.get(url).then((result) => { if (result) { setSource(result.data); + setIsSpin(false); } }).catch(error => {}) } @@ -83,7 +84,6 @@ function Tags(props) { render:(txt,item)=>{ return (
- TAR @@ -98,7 +98,17 @@ function Tags(props) { return(
-
+ { + source && source.length > 0 ? + +
+ : +
+ +
+ }
) } diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 5ce43cf24..b012cc588 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -32,4 +32,10 @@ } } } +} +.tagSpin{ + text-align: center; + display: flex; + align-items: center; + justify-content: center; } \ No newline at end of file -- 2.34.1 From 825cee4eac7c9d0b31bb790db78707fe9ea27ba8 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 18:07:48 +0800 Subject: [PATCH 08/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2md=E6=96=87=E4=BB=B6=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 2 +- src/forge/Main/tag/Index.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 023adb449..48f80ea29 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -105,7 +105,7 @@ function Tags(props) { className="tagTable" dataSource={source} columns={columns} pagination={false}> : -
+
} diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index b012cc588..5d72ab294 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -34,6 +34,7 @@ } } .tagSpin{ + min-height: 300px; text-align: center; display: flex; align-items: center; -- 2.34.1 From 8e1fb80f96b5259166972ac689150e94df6dd287 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 18:07:55 +0800 Subject: [PATCH 09/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2md=E6=96=87=E4=BB=B6=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderRootFileDetail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index c6c976f47..bdcfc98a7 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -27,6 +27,7 @@ class CoderRootFileDetail extends Component { } componentDidMount = () => { + window.scrollTo(0, 0); const { detail , mdFlag } = this.props; this.setState({ value: detail.content, @@ -214,7 +215,7 @@ class CoderRootFileDetail extends Component { const Option = Select.Option; return ( - +
{ md && readOnly && -- 2.34.1 From b0d13792816b193f8060499acc2791480bcae154 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 18:35:50 +0800 Subject: [PATCH 10/73] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=94=B9=E7=89=88=E5=90=8E=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=8E=A5=E5=8F=A3top=5Fcount.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderRootIndex.js | 63 ++++++++++++------------ src/forge/Newfile/UserSubmitComponent.js | 3 +- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js index b5d241968..7ff25dae1 100644 --- a/src/forge/Main/CoderRootIndex.js +++ b/src/forge/Main/CoderRootIndex.js @@ -3,7 +3,6 @@ import { Route , Switch } from 'react-router-dom'; // import Top from './DetailTop'; import Loadable from 'react-loadable'; import Loading from '../../Loading'; -import axios from 'axios'; import './Index.scss'; const FileNew = Loadable({ @@ -51,37 +50,37 @@ class CoderRootIndex extends Component{ } } - componentDidMount=()=>{ - this.Init(); - } - componentDidUpdate=(prevProps)=>{ - const { location } = this.props; - const prevlocation = prevProps && prevProps.location; - if (location !== prevlocation) { - this.Init(); - } - } + // componentDidMount=()=>{ + // this.Init(); + // } + // componentDidUpdate=(prevProps)=>{ + // const { location } = this.props; + // const prevlocation = prevProps && prevProps.location; + // if (location !== prevlocation) { + // this.Init(); + // } + // } - Init=()=>{ - const { branchName } = this.props.match.params; - const { defaultBranch } = this.props; - this.getTopCount(branchName || defaultBranch); - } + // Init=()=>{ + // const { branchName } = this.props.match.params; + // const { defaultBranch } = this.props; + // this.getTopCount(branchName || defaultBranch); + // } // 获取组件里要显示的数据 - getTopCount=(branch)=>{ - const { projectsId , owner } = this.props.match.params; - const url = `/${owner}/${projectsId}/top_counts.json`; - axios.get(url,{params:{ - ref:branch - }}).then(result=>{ - if(result){ - this.setState({ - coderCount:result.data - }) - } - }).catch(error=>{console.log(error);}) - } + // getTopCount=(branch)=>{ + // const { projectsId , owner } = this.props.match.params; + // const url = `/${owner}/${projectsId}/top_counts.json`; + // axios.get(url,{params:{ + // ref:branch + // }}).then(result=>{ + // if(result){ + // this.setState({ + // coderCount:result.data + // }) + // } + // }).catch(error=>{console.log(error);}) + // } render(){ return(
@@ -100,12 +99,12 @@ class CoderRootIndex extends Component{ > () + (props) => () } > () + () => () } > () + () => () } > {/* Date: Mon, 11 Oct 2021 19:39:01 +0800 Subject: [PATCH 11/73] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E6=8F=90=E4=BA=A4=E4=BF=A1=E6=81=AFmd=E6=B8=B2?= =?UTF-8?q?=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderRootCommit.js | 5 +++-- src/forge/css/index.scss | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js index 604917ba0..b542c3905 100644 --- a/src/forge/Main/CoderRootCommit.js +++ b/src/forge/Main/CoderRootCommit.js @@ -6,7 +6,8 @@ import { AlignTop } from '../Component/layout'; import SelectBranch from '../Branch/Select'; import Nodata from '../Nodata'; -import User from '../Component/User' +import User from '../Component/User'; +import RenderHtml from '../../components/render-html.jsx'; import Tree from './img/tree.png'; import axios from 'axios'; import {Link} from "react-router-dom"; @@ -158,7 +159,7 @@ class CoderRootCommit extends Component{
-
{item.message}
+

Date: Mon, 11 Oct 2021 19:44:48 +0800 Subject: [PATCH 12/73] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=97=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 48f80ea29..cf89cd7b4 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -4,6 +4,7 @@ import { Table , Tooltip , Spin } from 'antd'; import axios from 'axios'; import { Link } from 'react-router-dom'; import { truncateCommitId } from '../../common/util'; +import Nonedata from '../../Nodata'; import './Index.scss'; import Tree from '../img/tree.png' import moment from 'moment'; @@ -100,14 +101,15 @@ function Tags(props) { { source && source.length > 0 ? - -
- :

- + +
+
+ : + }
) -- 2.34.1 From cd30082956be3e6ffb45e813262988280b96bba0 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 20:03:03 +0800 Subject: [PATCH 13/73] styel --- src/forge/Main/tag/Index.jsx | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index cf89cd7b4..5e2ddbfa8 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -11,7 +11,7 @@ import moment from 'moment'; function Tags(props) { - const [ source , setSource ] = useState([]); + const [ source , setSource ] = useState(undefined); const [ isSpin , setIsSpin ] = useState(true); const { projectsId , owner } = props.match.params; @@ -99,18 +99,19 @@ function Tags(props) { return(
- { - source && source.length > 0 ? -
- -
-
-
- : - - } +
+ + { + source && source.length > 0 && +
+ } + { + source && source.length === 0 && + } +
+
) } -- 2.34.1 From 66c5662d01cb52af7d1986940dbc5b9d92683a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 11 Oct 2021 21:20:08 +0800 Subject: [PATCH 14/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=8F=90=E4=BA=A4=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=BF=A1=E6=81=AFmd=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 5 +++-- src/forge/Main/Diff.jsx | 2 +- src/forge/Main/Index.scss | 10 ++++++++-- src/forge/css/index.scss | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 70d1901eb..fe7eba521 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -22,6 +22,7 @@ import UpdateDescModal from './sub/UpdateDescModal'; import Nodata from '../Nodata'; import Invite from './sub/Invite'; import CheckProfile from '../Component/ProfileModal/Profile'; +import RenderHtml from '../../components/render-html'; /** * projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能) */ @@ -196,7 +197,7 @@ function CoderDepot(props){ let ele = document.getElementById("ptxt"); if(ele){ let h = ele.offsetHeight; - if( h > 18 ) setHideBtn(true); + if( h > 33 ) setHideBtn(true); } } },[projectDetail,lastCommit]) @@ -457,7 +458,7 @@ function CoderDepot(props){
-
{lastCommit.message}
+
{ hideBtn && changeHide(hide)}> } diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index a50c16c71..f5220b092 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -86,7 +86,7 @@ export default (props) => {
{commit && commit.message && - + } {data.branch}
diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index f2f7cd2b4..f87b82f97 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -252,7 +252,13 @@ border: 1px solid rgba(42, 97, 255, 0.23); background-color: #FAFCFF; .ellipsistxt{ - margin-top: 6px; + .markdown-body{ + line-height: 8px; + & p { + margin: 0 0px !important; + } + } + margin-top: 2px; // cursor: pointer; #ptxt{ margin-bottom: 0px; @@ -270,7 +276,7 @@ width: 0; color: #666; &.hidetxt{ - height: 18px; + height: 22px; overflow: hidden; position: relative; padding-right:8px; diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 12ebae462..a19619d73 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -104,7 +104,7 @@ ul,ol,dl{ white-space: normal; &:hover{ text-decoration: underline; - & p{ + & .markdown-body{ color: #466AFF; } } -- 2.34.1 From 8bdd619dde53fd3e82f5722e975170d057eda5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 12 Oct 2021 09:56:09 +0800 Subject: [PATCH 15/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=8F=90=E4=BA=A4=E4=BF=A1=E6=81=AF?= =?UTF-8?q?css=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 2 +- src/forge/Main/Diff.jsx | 3 +++ src/forge/Main/Index.scss | 29 ++++++++++++++++++++++++----- src/forge/Main/list.scss | 6 ++++++ 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index fe7eba521..c86e31d94 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -197,7 +197,7 @@ function CoderDepot(props){ let ele = document.getElementById("ptxt"); if(ele){ let h = ele.offsetHeight; - if( h > 33 ) setHideBtn(true); + if( h > 35 ) setHideBtn(true); } } },[projectDetail,lastCommit]) diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index f5220b092..045500615 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -18,6 +18,9 @@ const Infos = styled.div` border: 1px solid rgba(42, 97, 255, 0.23); border-radius: 3px 3px 0px 0px; padding: 10px 20px 10px 16px; + & .markdown-body table{ + background: #f1f8ff; + } & .f-wrap-between{ align-items: center; } diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index f87b82f97..a177ccc79 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -252,10 +252,10 @@ border: 1px solid rgba(42, 97, 255, 0.23); background-color: #FAFCFF; .ellipsistxt{ - .markdown-body{ - line-height: 8px; - & p { - margin: 0 0px !important; + &:hover .markdown-body{ + color: #466AFF; + & a{ + color: #466AFF; } } margin-top: 2px; @@ -269,6 +269,25 @@ white-space:-pre-wrap; /* Opera 4-6 */ white-space:-o-pre-wrap; /* Opera 7 */ word-wrap:break-word; + .markdown-body{ + line-height: 10px; + & p { + margin: 0px 0px !important; + } + & ol,ul{ + padding-bottom: 3px; + & li{ + min-height: 18px; + } + } + & table{ + line-height: 1; + background: #FAFCFF; + } + &:first-child { + margin-top: -1px !important; + } + } } margin-left: 13px; line-height:18px; @@ -276,7 +295,7 @@ width: 0; color: #666; &.hidetxt{ - height: 22px; + height: 24px; overflow: hidden; position: relative; padding-right:8px; diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss index 73b534de9..83b4d5ee7 100644 --- a/src/forge/Main/list.scss +++ b/src/forge/Main/list.scss @@ -735,6 +735,9 @@ a.color-grey-ccc:hover{ border-radius: 4px; margin-left: 16px; align-items: center; + & .markdown-body table{ + background: #FAFCFF; + } &:after,&:before{ content: ""; position: absolute; @@ -760,6 +763,9 @@ a.color-grey-ccc:hover{ &:before{ border-right: 10px solid rgba(42, 97, 255, 0.58); } + & .markdown-body table{ + background: #EEF6FF; + } } .treecopy-cont{ padding: 4px 15px; -- 2.34.1 From bcbd915bd1d95fcbd66174a02618428bf88ee8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 12 Oct 2021 10:24:58 +0800 Subject: [PATCH 16/73] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85Toolt?= =?UTF-8?q?ip=E6=B8=B2=E6=9F=93=E5=87=BAfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/Files.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index 87260cdd8..b4cf5b488 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -52,7 +52,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){ {item.name}
- 0 && ":"}${item.addition>0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}> + 0 ? ":":""}${item.addition>0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}> {item.addition >0 && +{item.addition}} {item.deletion >0 && -{item.deletion}} @@ -100,7 +100,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){
- 0 && ":"} ${item.addition > 0 ? item.addition + "处添加" : ""}${item.addition > 0 && item.deletion > 0 ? "和" : ""}${item.deletion > 0 ? item.deletion + "处删除" : ""}`}> + 0 ? ":":""} ${item.addition > 0 ? item.addition + "处添加" : ""}${item.addition > 0 && item.deletion > 0 ? "和" : ""}${item.deletion > 0 ? item.deletion + "处删除" : ""}`}> {item.addition+item.deletion}处 -- 2.34.1 From 1c5b5a66d8d49744f05bc64da43e9ca4111fc5c9 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Tue, 12 Oct 2021 10:32:09 +0800 Subject: [PATCH 17/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E9=A1=B5=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/edu-purge.css | 4 +++- src/forge/Main/tag/Index.jsx | 8 ++++++-- src/forge/Main/tag/Index.scss | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 603513339..a9692c92e 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1309,6 +1309,7 @@ span { margin: 0; padding: 0; margin-bottom: 0px!important; + font-weight: 500; } table, @@ -1362,7 +1363,8 @@ table { a:link, a:visited { text-decoration: none; - color: #05101a; + color: #333333; + font-weight: 500; } ol, diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index cf89cd7b4..20e74451e 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -35,7 +35,11 @@ function Tags(props) { key:1, ellipsis:true, render:(txt,item)=>{ - return {item.name} + return( +
+ {item.name} +
+ ) } }, { @@ -46,7 +50,7 @@ function Tags(props) { render:(txt,item)=>{ return ( - {item.commit && item.commit.name} + {item.tagger && item.tagger.name} 创建于{txt} ) diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 5d72ab294..80a3c828d 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -39,4 +39,10 @@ display: flex; align-items: center; justify-content: center; +} +.tagBranch{ + width: 200px; + margin-left: -67px; + text-overflow: ellipsis; + overflow: hidden; } \ No newline at end of file -- 2.34.1 From 63a74cc0764a7ab45ad11882d844b8ccdf4c031a Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Tue, 12 Oct 2021 10:45:54 +0800 Subject: [PATCH 18/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E9=A1=B5=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/edu-purge.css | 4 +--- src/forge/Main/tag/Index.scss | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index a9692c92e..603513339 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1309,7 +1309,6 @@ span { margin: 0; padding: 0; margin-bottom: 0px!important; - font-weight: 500; } table, @@ -1363,8 +1362,7 @@ table { a:link, a:visited { text-decoration: none; - color: #333333; - font-weight: 500; + color: #05101a; } ol, diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 80a3c828d..89f473f54 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -23,6 +23,8 @@ line-height: 69px; div{ padding-left: 69px; + font-weight: 500; + color:#333333; } } &:last-child{ -- 2.34.1 From fd58c70c545de128bec0e677f652f657d28358c6 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Tue, 12 Oct 2021 11:03:03 +0800 Subject: [PATCH 19/73] =?UTF-8?q?issue=E6=A0=87=E7=AD=BE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 5 +++-- src/forge/Main/tag/Index.scss | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 20e74451e..4a0ce00a3 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -34,10 +34,11 @@ function Tags(props) { dataIndex:"name", key:1, ellipsis:true, + render:(txt,item)=>{ return(
- {item.name} + {item.name}
) } @@ -49,7 +50,7 @@ function Tags(props) { ellipsis:true, render:(txt,item)=>{ return ( - + {item.tagger && item.tagger.name} 创建于{txt} diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 89f473f54..bff4c97b4 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -21,10 +21,10 @@ padding:0px; height: 69px; line-height: 69px; + color:#333333; div{ padding-left: 69px; font-weight: 500; - color:#333333; } } &:last-child{ @@ -47,4 +47,10 @@ margin-left: -67px; text-overflow: ellipsis; overflow: hidden; + .tagClass{ + color:#333333; + } +} +.tagModel{ + font-weight: 400; } \ No newline at end of file -- 2.34.1 From 112aacb6a107c01cc5543fdb5bbe2fdcd9e723d4 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Tue, 12 Oct 2021 11:49:04 +0800 Subject: [PATCH 20/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 458de69a0..4a0ce00a3 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -11,7 +11,7 @@ import moment from 'moment'; function Tags(props) { - const [ source , setSource ] = useState(undefined); + const [ source , setSource ] = useState([]); const [ isSpin , setIsSpin ] = useState(true); const { projectsId , owner } = props.match.params; @@ -104,19 +104,18 @@ function Tags(props) { return(
-
- - { - source && source.length > 0 && -
- } - { - source && source.length === 0 && - } -
-
+ { + source && source.length > 0 ? +
+ +
+
+
+ : + + }
) } -- 2.34.1 From c282a1e034d63d8a4b5b5033b37acc70593d67d0 Mon Sep 17 00:00:00 2001 From: caishi Date: Tue, 12 Oct 2021 11:57:27 +0800 Subject: [PATCH 21/73] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 29 ++++++++++++++++++++++------- src/forge/Main/tag/Index.scss | 12 +++++++++--- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 458de69a0..6a111b454 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -4,6 +4,7 @@ import { Table , Tooltip , Spin } from 'antd'; import axios from 'axios'; import { Link } from 'react-router-dom'; import { truncateCommitId } from '../../common/util'; +import { getImageUrl } from 'educoder'; import Nonedata from '../../Nodata'; import './Index.scss'; import Tree from '../img/tree.png' @@ -34,12 +35,12 @@ function Tags(props) { dataIndex:"name", key:1, ellipsis:true, - + width:"200px", render:(txt,item)=>{ return(
- {item.name} -
+ {item.name} +
) } }, @@ -51,7 +52,21 @@ function Tags(props) { render:(txt,item)=>{ return ( - {item.tagger && item.tagger.name} + { + item.tagger && + + { + item.tagger.id ? + + + + : + + + + } + + } 创建于{txt} ) @@ -86,17 +101,17 @@ function Tags(props) { key:5, ellipsis:true, align:"center", - width:"181px", + width:"204px", render:(txt,item)=>{ return ( - + ) } } diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index bff4c97b4..70e83a837 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -13,6 +13,9 @@ } } tbody{ + .btn-83{ + margin:0px 8px; + } tr{ &:hover td{ background-color: #fff!important; @@ -23,7 +26,6 @@ line-height: 69px; color:#333333; div{ - padding-left: 69px; font-weight: 500; } } @@ -43,8 +45,7 @@ justify-content: center; } .tagBranch{ - width: 200px; - margin-left: -67px; + padding-right: 15px; text-overflow: ellipsis; overflow: hidden; .tagClass{ @@ -53,4 +54,9 @@ } .tagModel{ font-weight: 400; + .tagModelImg img{ + width: 25px; + height: 25px; + border-radius: 50%; + } } \ No newline at end of file -- 2.34.1 From 19b73811201ce3d7476971d56c596202645ee736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 12 Oct 2021 15:14:49 +0800 Subject: [PATCH 22/73] issue --- src/forge/Branch/SelectOverlay.jsx | 2 ++ src/forge/Main/Diff.jsx | 2 +- src/forge/Main/Index.scss | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/forge/Branch/SelectOverlay.jsx b/src/forge/Branch/SelectOverlay.jsx index f043a8f52..e9c4aae4f 100644 --- a/src/forge/Branch/SelectOverlay.jsx +++ b/src/forge/Branch/SelectOverlay.jsx @@ -53,8 +53,10 @@ function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owne setIsSpin(true); if(e.key === "branch"){ getBranchs(projectsId,owner); + setNav(0); }else{ getTags(projectsId,owner); + setNav(1); } } diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index 045500615..6556023e3 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -91,7 +91,7 @@ export default (props) => { {commit && commit.message && } - {data.branch} + {data.branch}
diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index a177ccc79..a42bfec50 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -271,8 +271,10 @@ word-wrap:break-word; .markdown-body{ line-height: 10px; + font-size: 14px; & p { - margin: 0px 0px !important; + margin: 1px 0px 0px !important; + font-size: 14px !important; } & ol,ul{ padding-bottom: 3px; -- 2.34.1 From a09d330a7ed9f71bc58a8f1d8a52a96f4609269a Mon Sep 17 00:00:00 2001 From: yuzhantian <2205129388@qq.com> Date: Tue, 12 Oct 2021 16:12:16 +0800 Subject: [PATCH 23/73] =?UTF-8?q?refactor:=20=E6=96=B0=E5=BB=BA=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E8=AF=B7=E6=B1=82=E8=B7=AF=E7=94=B1=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 10 +- src/forge/Main/CoderDepot.jsx | 2 +- src/forge/Main/Detail.js | 20 +- src/forge/Main/tree/Index.jsx | 2 +- src/forge/Merge/CreateMerge.js | 413 ++++++++++++++++++++++++++++ src/forge/Merge/MergeLinkFooter.jsx | 10 +- src/forge/Merge/MessageCount.js | 2 +- src/forge/Merge/NewMerge.js | 4 +- src/forge/Merge/merge.js | 2 +- src/forge/Merge/merge_footer.js | 227 +++++---------- src/forge/Merge/merge_form.js | 3 +- src/forge/Merge/no_data.js | 2 +- 12 files changed, 514 insertions(+), 183 deletions(-) create mode 100644 src/forge/Merge/CreateMerge.js diff --git a/src/App.js b/src/App.js index 442d4f323..3072aca5b 100644 --- a/src/App.js +++ b/src/App.js @@ -97,10 +97,10 @@ const ProjectIndex = Loadable({ loading: Loading, }); -const CreateMerge = Loadable({ - loader: () => import('./forge/Merge/NewMerge'), - loading: Loading, -}) +// const CreateMerge = Loadable({ +// loader: () => import('./forge/Merge/NewMerge'), +// loading: Loading, +// }) // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize"]; @@ -279,7 +279,7 @@ class App extends Component { } /> {/* 项目PR */} - () } diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 70d1901eb..df5e2449b 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -425,7 +425,7 @@ function CoderDepot(props){
{ baseOperate && - urlLink(`/${owner}/${projectsId}/pulls/new/${branchName || defaultBranch}`)} >+ 合并请求 + urlLink(`/${owner}/${projectsId}/compare/${branchName || defaultBranch}`)} >+ 合并请求 } { baseOper && diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index bc35344f4..70283d310 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -70,7 +70,7 @@ const MergeIndexDetail = Loadable({ }) const CreateMerge = Loadable({ - loader: () => import('../Merge/NewMerge'), + loader: () => import('../Merge/CreateMerge'), loading: Loading, }) @@ -150,7 +150,9 @@ function checkPathname(projectsId, owner, pathname) { name = "about" } else if (url.indexOf("/issues") > -1 || url.indexOf("Milepost") > 0) { name = "issues"; - } else if (url.indexOf("/pulls") > -1) { + } else if (url.indexOf("/pulls") > -1 || url.indexOf("/compare") > -1) { + // /pulls,合并请求除新建合并请求外, + // /compare,新建合并请求 name = "pulls" } else if (url.indexOf("/milestones") > -1) { name = "milestones" @@ -713,17 +715,17 @@ class Detail extends Component { } > {/* 新建合并请求 */} - () + } + > */} + () } > - () - } - > - () } diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index 84220a0bb..00953b052 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -91,7 +91,7 @@ function Index(props) {
{ (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && - + 合并请求 + + 合并请求 } 下载 diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js new file mode 100644 index 000000000..2ee29c39f --- /dev/null +++ b/src/forge/Merge/CreateMerge.js @@ -0,0 +1,413 @@ +import React, { Component } from 'react'; +import { Input, Select, Spin, Alert } from 'antd'; +import axios from 'axios'; +import MergeForm from './merge_form'; +import MergeFooter from './merge_footer'; + +import '../Order/order.css'; +import './merge.css'; + +/** + * 根据url获取目标仓库、目标分支、源仓库、源分支 + * 路由规则:owner/projectId/compare/merge...pullowner:pullBranch + * 可能存在的情况 + * 1、代码库首页跳转,仓库相同,目标分支为默认分支,owner/projectId/compare/pullBranch + * 2、代码库分支列表,仓库相同,目标分支为默认分支,owner/projectId/compare/pullBranch + * 3、合并请求列表页(新建、无数据时的提示),仓库相同,源、目标都为默认分支,owner/projectId/compare + * 4、新建页面,切换分支、切换目标仓库、刷新页面等,存在所有可能情况 + */ +function getBranchParams(pathname) { + const result = { + // 目标仓库所有者 + mergeOwner: undefined, + // 目标分支 + mergeBranch: 'master', + // 源仓库所有者 + pullOwner: undefined, + // 源分支 + pullBranch: 'master', + // 仓库名称 + projectId: undefined, + }; + // 去掉第一个字符/ + const _pathname = pathname.slice(1); + const [ownerProject, branchUrl] = _pathname.split('/compare'); + const [mergeOwner, projectId] = ownerProject.split('/'); + // 同仓库时 + result.mergeOwner = mergeOwner; + result.pullOwner = mergeOwner; + result.projectId = projectId; + if (branchUrl) { + // 如果存在具体的分支 + const _branchUrl = branchUrl.slice(1); + if (_branchUrl.indexOf('...') > -1) { + // 存在源分支与目标分支 + const [mergeBranch, pullObj] = _branchUrl.split('...'); + result.mergeBranch = mergeBranch; + if (pullObj.indexOf(':') > -1) { + // 存在源仓库 + const [pullOwner, pullBranch] = pullObj.split(':'); + result.pullOwner = pullOwner; + result.pullBranch = pullBranch; + } else { + result.pullBranch = pullObj; + } + } else { + result.pullBranch = _branchUrl; + } + } + return result; +} + +const Option = Select.Option; + +class CreateMerge extends Component { + constructor(props) { + super(props); + const { pullBranch, mergeBranch } = getBranchParams( + this.props.location.pathname + ); + this.state = { + data: undefined, + pullBranches: undefined, + mergeBranches: undefined, + mergeProjects: undefined, + merge: mergeBranch || 'master', + pull: pullBranch || 'master', + id: undefined, + // isFork: false, + projects_names: undefined, + isSpin: true, + showMessage: false, + merge_head: false, // 是否向fork后的源项目发起合并请求 + defaultMessage: '必须选择不同的分支', + project_id: undefined, // 当前项目的id,也即开始发送合并请求的源项目id + merge_project_user: undefined, + comparesData: undefined, //提交和文件的内容,保存compare接口返回的数据 + // 比较分支时的加载效果 + isCompareSpin: true, + // 是否是初次加载,用这个字段来控制提示组件和文件组件的显示、隐藏比直接用isCompareSpin交互友好些 + isFirstLoading: true, + }; + } + + componentDidMount = () => { + // 初始化时根据url获取目标仓库、分支,源仓库、分支; + // 再获取对应的仓库列表、分支列表 + // 再调用比较接口 + const branchParams = getBranchParams(this.props.location.pathname); + console.log('componentDidMount branchParams', branchParams); + this.getMergeInfo(branchParams); + }; + + componentDidUpdate = (preProps) => { + // url变化触发时(切换源分支、切换目标仓库、切换目标分支;回退) + const oldPathname = preProps.location.pathname; + const newPathname = this.props.location.pathname; + if (oldPathname !== newPathname) { + const branchParams = getBranchParams(newPathname); + console.log('componentDidUpdate branchParams', branchParams); + this.getMergeInfo(branchParams); + } + }; + + //获取新建合并请求数据 + getMergeInfo = (branchParams) => { + this.setState({ isSpin: true }); + const { pullOwner, pullBranch, mergeOwner, mergeBranch, projectId } = + branchParams; + const url = `/${pullOwner}/${projectId}/pulls/new.json`; + axios + .get(url) + .then((result) => { + if (result) { + this.setState({ + // isFork: result.data.is_fork, + projects_names: result.data.projects_names, + mergeProjects: result.data.merge_projects, + pullBranches: result.data.branches, + mergeBranches: result.data.branches, + project_id: result.data.project_id, + id: result.data.id, + merge: mergeBranch, + pull: pullBranch, + }); + } + if (pullOwner !== mergeOwner) { + this.getBranchList(mergeOwner, projectId); + } + this.compareProject(result.data.id, branchParams); + this.setState({ isSpin: false }); + }) + .catch((error) => { + this.setState({ isSpin: false }); + console.log(error); + }); + }; + + // compare接口,获取分支对比信息 + compareProject = (baseid, branchParams) => { + // const { project } = this.props; + // const { owner, projectsId } = this.props.match.params; + const projectObj = this.props.project; + const { pullOwner, pullBranch, mergeOwner, mergeBranch, projectId } = + branchParams; + + let url = `/${mergeOwner}/${projectId}/compare`; + if (projectObj) { + if (baseid === projectObj.id) { + url += `/${pullBranch}...${mergeBranch}.json`; + } else { + url += `/${mergeBranch}...${pullOwner}/${projectId}:${pullBranch}.json`; + } + this.setState({ isSpin: false, isCompareSpin: true }); + axios + .get(url) + .then((result) => { + if (result) { + if (result.data.status === 0) { + this.setState({ + showMessage: false, + }); + } else { + this.setState({ + showMessage: true, + defaultMessage: result.data.message, + }); + } + this.setState({ + comparesData: result.data, + }); + } + this.setState({ + isFirstLoading: false, + isSpin: false, + isCompareSpin: false, + }); + }) + .catch((error) => { + this.setState({ isSpin: false, isCompareSpin: false }); + }); + } + }; + + // 根据所有者、仓库名,获取分支列表,目前仅涉及目标仓库分支查询 + getBranchList = (login, projectId) => { + this.setState({ isSpin: true }); + const url = `/${login}/${projectId}/pulls/get_branches.json`; + axios + .get(url) + .then((result) => { + if (result) { + this.setState({ + mergeBranches: result.data, + }); + } + this.setState({ isSpin: false }); + }) + .catch((error) => { + this.setState({ isSpin: false }); + console.log(error); + }); + }; + + // 切换分支事件 + selectBrach = (type, value) => { + const { pullOwner, pullBranch, mergeOwner, mergeBranch, projectId } = + getBranchParams(this.props.location.pathname); + let _url = `/${mergeOwner}/${projectId}/compare/`; + // type为pull时,pullBranch取value,否则取原有值 + // type为pull时,mergeBranch取原有值,否则取value + let _pullBranch = type === 'pull' ? value : pullBranch; + let _mergeBranch = type === 'pull' ? mergeBranch : value; + if (pullOwner === mergeOwner) { + // 如果仓库相同, compare/目标分支...源分支 + _url += `${_mergeBranch}...${_pullBranch}`; + } else { + // 如果仓库不同, compare/目标分支...源分支 + _url += `${_mergeBranch}...${pullOwner}:${_pullBranch}`; + } + this.props.history.push(_url); + }; + + // 切换仓库响应事件,目前仅目标分支可切换仓库 + selectProjectName = (value) => { + const { projects_names, id } = this.state; + const { pullOwner, pullBranch } = getBranchParams( + this.props.location.pathname + ); + let arr = + projects_names && projects_names.filter((item) => item.id === value); + let identifier = arr && arr[0].project_id; + let login = arr && arr[0].project_user_login; + // 目标仓库与源仓库不是一个仓库 + let is_fork = parseInt(value, 10) !== parseInt(id, 10); + this.setState({ + isSpin: true, + // merge_head: is_fork, + data: { + is_original: is_fork, + fork_project_id: is_fork ? id : '', + merge_user_login: is_fork + ? projects_names[0].project_user_login + : undefined, + }, + }); + if (login === pullOwner) { + // 如果切换后, 仓库与源仓库一致了 + this.props.history.push( + `/${login}/${identifier}/compare/master...${pullBranch}` + ); + } else { + this.props.history.push( + `/${login}/${identifier}/compare/master...${pullOwner}:${pullBranch}` + ); + } + // this.newMergelist(login, identifier); + }; + + // 渲染分支列表 + renderBrances = (list) => { + if (list && list.length > 0) { + return list.map((item, key) => { + return ( + + ); + }); + } + }; + + // 渲染项目列表 + renderProjectNames = (list) => { + if (list && list.length > 0) { + return list.map((item, key) => { + return ( + + ); + }); + } + }; + + // 渲染html内容 + withHtml = (html) => { + return
; + }; + + render() { + const { + data, + pullBranches, + mergeBranches, + mergeProjects, + pull, + merge, + isSpin, + isCompareSpin, + isFirstLoading, + showMessage, + defaultMessage, + projects_names, + id, + comparesData, + } = this.state; + + let { project } = this.props; + + return ( +
+ +
+
+
+
源分支:
+ + + + +
+
+ +
+
+
+
目标分支:
+ + + + +
+
+
+ {/* 非加载状态且有提示 */} + {!isCompareSpin && showMessage && ( +
+ +
+ )} + {/* 非加载状态且可以提交 */} + {!isCompareSpin && !showMessage && ( + + )} +
+ {!isFirstLoading && ( + + )} +
+
+ ); + } +} + +export default CreateMerge; diff --git a/src/forge/Merge/MergeLinkFooter.jsx b/src/forge/Merge/MergeLinkFooter.jsx index 104d2168b..9f43086a9 100644 --- a/src/forge/Merge/MergeLinkFooter.jsx +++ b/src/forge/Merge/MergeLinkFooter.jsx @@ -111,10 +111,10 @@ class MergeFooter extends Component { } = this.state; // 评论数量优先取Comment组件中列表接口返回的,其次取合并请求详情接口中的,都没有取默认值0 - const commentsTotalCount = - this.state.commentsTotalCount || - (data.comments_total_count && parseInt(data.comments_total_count, 10)) || - 0; + const commentsTotalCount = parseInt( + this.state.commentsTotalCount || data.comments_total_count || 0, + 10 + ); return (
@@ -128,7 +128,7 @@ class MergeFooter extends Component { tab={ 评论 - {commentsTotalCount && ( + {commentsTotalCount > 0 && ( {commentsTotalCount} )} diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 6409bd7f1..abdea3dd4 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -445,7 +445,7 @@ class MessageCount extends Component { type="green" ghost className="ml20" - onClick={()=>{this.props.history.push(`/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}} + onClick={()=>{this.props.history.push(`/${owner}/${projectsId}/pulls/${mergeId}/updatemerge`);}} > 编辑 diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js index 8913b0d1c..c5c5e2df6 100644 --- a/src/forge/Merge/NewMerge.js +++ b/src/forge/Merge/NewMerge.js @@ -194,7 +194,7 @@ class NewMerge extends Component { // this.ischeckmerge(); let { id ,merge , pull } = this.state; if(type==="pull"){ - this.props.history.push(`/${owner}/${projectsId}/pulls/new/${pull}`) + this.props.history.push(`/${owner}/${projectsId}/compare/${pull}`) this.compareProject(id,value,merge); }else{ this.compareProject(id,pull,value); @@ -216,7 +216,7 @@ class NewMerge extends Component { merge_user_login: is_fork_id ? projects_names[0].project_user_login : undefined } }) - this.props.history.push(`/${login}/${identifier}/pulls/new`); + this.props.history.push(`/${login}/${identifier}/compare`); this.newMergelist(login,identifier); }; diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js index 399c9bd91..2e742d720 100644 --- a/src/forge/Merge/merge.js +++ b/src/forge/Merge/merge.js @@ -213,7 +213,7 @@ class merge extends Component { checkOperation() { const { projectsId,owner } = this.props.match.params; - this.props.history.push(`/${owner}/${projectsId}/pulls/new`); + this.props.history.push(`/${owner}/${projectsId}/compare`); } render() { const { projectsId , owner } = this.props.match.params; diff --git a/src/forge/Merge/merge_footer.js b/src/forge/Merge/merge_footer.js index 5e3a75560..868e736fe 100644 --- a/src/forge/Merge/merge_footer.js +++ b/src/forge/Merge/merge_footer.js @@ -1,169 +1,84 @@ -import React, { Component } from "react"; -import { Tabs, Spin } from "antd"; -import "../Order/order.css"; -import "./merge.css"; -import Commits from "./Commits"; -import Comments from "../comments/comments"; -import Files from "./Files"; -import axios from 'axios'; +import React, { Component } from 'react'; +import { Tabs } from 'antd'; +import Commits from './Commits'; +import Files from './Files'; + +import '../Order/order.css'; +import './merge.css'; + const { TabPane } = Tabs; class MergeFooter extends Component { - constructor(props){ + constructor(props) { super(props); - this.state={ - pageData:undefined, - commitsData:undefined, - filesData:undefined, - isSpin:false, - activeKey:"1", - commitCount:0, - filesCount:0 - } - } - componentDidMount=()=>{ - const { footer_type ,data } = this.props; - if(footer_type){ - const { projectsId , owner , mergeId } = this.props.match.params; - this.getCommit(owner,projectsId,mergeId); - this.getFile(owner,projectsId,mergeId); - } - this.setState({ - activeKey:footer_type ? "1" : "2", - commitCount:data && data.commits_count, - filesCount:data && data.files_count - }) - } - componentDidUpdate=(prevProps)=>{ - const { comparesData } = this.props; - const { footer_type } = this.props; - if(footer_type){ - const { data } = this.props; - if(data !== prevProps.data){ - this.setState({ - commitCount:data && data.commits_count, - filesCount:data && data.files_count - }) - } - } - if(comparesData !== prevProps.comparesData){ - this.setState({ - activeKey:footer_type ? "1" : "2" - }) - this.changeTab(footer_type ? "1" : "2"); - } + this.state = { + activeKey: '1', + }; } - changeTab=(index)=>{ + changeTab = (index) => { this.setState({ - isSpin:true - }) - this.setState({ - activeKey:index - }) - const { footer_type , comparesData } = this.props; - const { projectsId , owner , mergeId } = this.props.match.params; - - if(footer_type){ - if(index === "2"){ - this.getCommit(owner,projectsId,mergeId); - }else if(index === "3"){ - this.getFile(owner,projectsId,mergeId); - }else{ - this.setState({ - isSpin:false - }) - } - }else{ - this.setState({ - commitsData:comparesData.commits, - filesData:comparesData.diff, - commitCount:comparesData.commits_count, - filesCount:comparesData.diff && comparesData.diff.files_count, - isSpin:false - }) - } - } - - getCommit =(owner,projectsId,mergeId)=>{ - const url = `/${owner}/${projectsId}/pulls/${mergeId}/commits.json`; - axios.get(url).then(result=>{ - if(result){ - this.setState({ - commitsData:result.data.commits, - isSpin:false, - commitCount:result.data.commits_count - }) - } - }).catch(error=>{}) - } - - getFile =(owner,projectsId,mergeId)=>{ - const url = `/${owner}/${projectsId}/pulls/${mergeId}/files.json`; - axios.get(url).then(result=>{ - if(result){ - this.setState({ - filesData:result.data, - isSpin:false, - filesCount:result.data.files_count, - }) - } - }).catch(error=>{}) - } + activeKey: index, + }); + }; render() { - const { projectsId , owner } = this.props.match.params; + const { projectsId, owner } = this.props.match.params; + const { comparesData = {} } = this.props; + const { commits, diff, commits_count } = comparesData; + const { activeKey } = this.state; - const { footer_type, order_id, data , comparesData } = this.props; - let { isSpin , activeKey , filesCount, commitCount , filesData , commitsData } = this.state; - - return ( - !footer_type && !comparesData || (comparesData && ((comparesData.commits && comparesData.commits.length===0)||(comparesData && !comparesData.diff)) )?"": -
- - - { - footer_type && - 评论 - {data && parseInt(data.comments_count) > 0 && {data.comments_count}} - - } key="1"> - - - } - { - commitsData && commitsData.length > 0 && - 提交 - {commitCount > 0 && {commitCount}} - } key="2"> - - - } - { - filesData && filesData.files && filesData.files.length>0 && - 文件 - {filesCount > 0 && {filesCount}} - - } key="3"> - - - } - - - + return (commits && commits.length === 0) || !diff ? ( + '' + ) : ( +
+ + {commits && commits.length > 0 && ( + + 提交 + {commits_count > 0 && ( + {commits_count} + )} + + } + key="1" + > + + + )} + {diff && diff.files && diff.files.length > 0 && ( + + 文件 + {diff.files_count > 0 && ( + {diff.files_count} + )} + + } + key="3" + > + + + )} +
); } diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js index 1f03a433e..4716bdfca 100644 --- a/src/forge/Merge/merge_form.js +++ b/src/forge/Merge/merge_form.js @@ -165,7 +165,8 @@ class MergeForm extends Component { this.setState({ isSpin: false, }); - this.props.history.push(`/${owner}/${projectsId}/pulls`); + const { pull_request_id } = result.data; + this.props.history.push(`/${owner}/${projectsId}/pulls/${pull_request_id}`); const { getDetail } = this.props; getDetail && getDetail(); } else { diff --git a/src/forge/Merge/no_data.js b/src/forge/Merge/no_data.js index d5584797f..f403bb4ea 100644 --- a/src/forge/Merge/no_data.js +++ b/src/forge/Merge/no_data.js @@ -12,7 +12,7 @@ class Nodata extends Component{

欢迎使用合并请求!

- 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求 + 合并请求可以帮助您与他人协作编写代码。在使用之前,请先创建一个 合并请求
-- 2.34.1 From b578383e8d02f09afb076a60a9c0ecf77fefc753 Mon Sep 17 00:00:00 2001 From: caishi Date: Tue, 12 Oct 2021 17:15:16 +0800 Subject: [PATCH 24/73] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/edu-purge.css | 6 ++---- src/forge/Main/Index.scss | 2 +- src/forge/Settings/Setting.js | 23 ++++++++++++++++++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 603513339..1ec104461 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1949,9 +1949,7 @@ a.decoration { } .mr20 { - margin-right: 10px; - margin-left: 10px; - float: left; + margin-right: 20px; } .mr25 { @@ -1959,7 +1957,7 @@ a.decoration { } .mr30 { - margin-right: 10px; + margin-right: 30px; } .mr35 { diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index a42bfec50..4ec6a7cb6 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -195,7 +195,7 @@ width: 40px; height: 40px; } - &:nth-child(5){ + &:nth-child(5n){ margin-right: 0px; } } diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index b1af2f998..ec9f80c83 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -153,15 +153,20 @@ class Setting extends Component { name: values.project_name, description: values.project_description, private: private_check, + identifier:values.project_identifier, ...values, }).then((result) => { if (result) { - this.props.showNotification(`仓库信息修改成功!`); - const { getDetail } = this.props; - getDetail && getDetail(); this.setState({ loading:false }) + this.props.showNotification(`仓库信息修改成功!`); + // if(values.project_identifier !== projectsId){ + // this.props.history.push(`/${owner}/${values.project_identifier}/settings`); + // }else{ + // } + const { getDetail } = this.props; + getDetail && getDetail(); } }).catch((error) => { console.log(error); @@ -283,6 +288,18 @@ class Setting extends Component { )}
+ {/* + {getFieldDecorator("project_identifier", { + rules: [ + { + required: true, + message: "请输入项目标识", + }, + ], + })( + + )} + */} {getFieldDecorator("project_description", { rules: [], -- 2.34.1 From 1fbe6671b1e0b77c3c33799d437eb740343dbc9b Mon Sep 17 00:00:00 2001 From: caishi Date: Tue, 12 Oct 2021 17:32:09 +0800 Subject: [PATCH 25/73] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index c86e31d94..f2e4e149a 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -402,7 +402,7 @@ function CoderDepot(props){ getPathUrl={getPathUrl} /> : -
+ @@ -417,7 +417,7 @@ function CoderDepot(props){ {projectDetail && projectDetail.tags && projectDetail.tags.total_count} -
+ } -- 2.34.1 From 94ceec26e98ea7c50d2d7b13dac8e19eac27e192 Mon Sep 17 00:00:00 2001 From: caishi Date: Tue, 12 Oct 2021 18:03:25 +0800 Subject: [PATCH 26/73] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 26 +++++++++++++------------- src/forge/Main/tag/Index.scss | 4 ---- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 6a111b454..0fd40b1f4 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -119,19 +119,19 @@ function Tags(props) { return(
-
- - { - source && source.length > 0 && -
- } - { - source && source.length === 0 && - } -
-
+ +
+ { + source && source.length > 0 && +
+ } + { + source && source.length === 0 && + } +
+
) } diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 70e83a837..6adba91e3 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -39,10 +39,6 @@ } .tagSpin{ min-height: 300px; - text-align: center; - display: flex; - align-items: center; - justify-content: center; } .tagBranch{ padding-right: 15px; -- 2.34.1 From fe4c5a79d2631e62334d4e32fafacf43a1ed3905 Mon Sep 17 00:00:00 2001 From: caishi Date: Wed, 13 Oct 2021 09:57:04 +0800 Subject: [PATCH 27/73] =?UTF-8?q?=E4=BB=93=E5=BA=93=E8=AE=BE=E7=BD=AE-?= =?UTF-8?q?=E5=8F=AF=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/edu-purge.css | 2 +- src/forge/Settings/Setting.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 1ec104461..0d146204c 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -2456,7 +2456,7 @@ a.hoverLine:hover{ .color-grey-9 { - color: #333333 !important; + color: #999 !important; } a:hover{ diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index ec9f80c83..460ec1620 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -161,12 +161,12 @@ class Setting extends Component { loading:false }) this.props.showNotification(`仓库信息修改成功!`); - // if(values.project_identifier !== projectsId){ - // this.props.history.push(`/${owner}/${values.project_identifier}/settings`); - // }else{ - // } + if(values.project_identifier !== projectsId){ + this.props.history.push(`/${owner}/${values.project_identifier}/settings`); + }else{ const { getDetail } = this.props; getDetail && getDetail(); + } } }).catch((error) => { console.log(error); @@ -288,7 +288,9 @@ class Setting extends Component { )}
- {/* + 项目标识 (项目url标识部分,更改项目标识将导致原仓库地址失效)} + > {getFieldDecorator("project_identifier", { rules: [ { @@ -299,7 +301,7 @@ class Setting extends Component { })( )} - */} + {getFieldDecorator("project_description", { rules: [], -- 2.34.1 From a7c2120cf3c9f10390b68d161df2c678be8e30ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Wed, 13 Oct 2021 13:37:51 +0800 Subject: [PATCH 28/73] =?UTF-8?q?=E5=8A=A8=E6=80=81=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Head/Header.js | 7 +++---- src/forge/SecuritySetting/Index.jsx | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 59513153b..9e10a0ff7 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -367,7 +367,6 @@ class NewHeader extends Component { } let search_url = settings && settings.common && settings.common.search; - let notice_url = settings && settings.common && settings.common.notice; return (
@@ -438,7 +437,7 @@ class NewHeader extends Component { :"" } - {current_user && current_user.login ? + { settings && settings.common && settings.common.notice ? - + {current_user && - + } : "" diff --git a/src/forge/SecuritySetting/Index.jsx b/src/forge/SecuritySetting/Index.jsx index 8419fd31c..f897dea19 100644 --- a/src/forge/SecuritySetting/Index.jsx +++ b/src/forge/SecuritySetting/Index.jsx @@ -43,8 +43,9 @@ const PrivateLetter = Loadable({ }); function Index(props){ - const { current_user } = props; + const { current_user,mygetHelmetapi } = props; const { pathname } = props.location; + const notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice; return(
@@ -59,11 +60,11 @@ function Index(props){
  • 个人信息
  • -1 ?"active":""}>基本资料
  • -
      + {notice_url &&
      • 消息通知
      • -1 && pathname.indexOf("/settings/notice/config") == -1) || pathname.indexOf("/settings/notice/privateLetter")>-1 ?"active":""}>我的通知
      • {/*
      • -1 ?"active":""}>通知管理
      • */} -
      +
    }
    -- 2.34.1 From b30f2169e45d7d23a2d6cdb98d3353159a760f66 Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 15 Oct 2021 15:20:21 +0800 Subject: [PATCH 49/73] =?UTF-8?q?=E6=95=B0=E6=8D=AEstate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Activity/Activity.js | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/forge/Activity/Activity.js b/src/forge/Activity/Activity.js index fed2992ae..4a7a1d345 100644 --- a/src/forge/Activity/Activity.js +++ b/src/forge/Activity/Activity.js @@ -40,6 +40,11 @@ class Activity extends Component{ type:undefined, state:undefined, page:1, + pr_count:undefined, + new_pr_count:undefined, + close_issues_count:undefined, + open_issues_count:undefined, + pr_all_count:undefined,issues_count:undefined, data:undefined, project_trends:undefined, @@ -67,7 +72,13 @@ class Activity extends Component{ this.setState({ data:result.data, project_trends:result.data.project_trends, - isSpin:false + isSpin:false, + pr_count:result.data.pr_count, + new_pr_count:result.data.new_pr_count, + close_issues_count:result.data.close_issues_count, + open_issues_count:result.data.open_issues_count, + pr_all_count:result.data.pr_all_count, + issues_count:result.data.issues_count, }) window.scrollTo(0,0); } @@ -113,12 +124,14 @@ class Activity extends Component{ ) render(){ - const { time , data , page , project_trends , isSpin } = this.state; + const { time , data , page , project_trends , isSpin , pr_count , new_pr_count , close_issues_count , open_issues_count , pr_all_count ,issues_count } = this.state; let name = time ? ARRAY.filter(item=>item.id === parseInt(time)) :[{name:"全部"}]; - const first_per = data && (parseInt(data.pr_count)/parseInt(data.pr_all_count)*100).toFixed(2)+'%'; - const second_per =data && (parseInt(data.new_pr_count)/parseInt(data.pr_all_count)*100).toFixed(2)+'%'; - const third_per =data && (parseInt(data.close_issues_count)/parseInt(data.issues_count)*100).toFixed(2)+'%'; - const fourth_per =data && (parseInt(data.open_issues_count)/parseInt(data.issues_count)*100).toFixed(2)+'%'; + + const first_per = pr_all_count > 0 ? `${parseFloat(pr_count/pr_all_count).toFixed(2)*100}%` :"50%"; + const second_per =pr_all_count > 0 ? `${parseFloat(new_pr_count/pr_all_count).toFixed(2)*100}%` :"50%"; + const third_per =issues_count > 0 ?`${parseFloat(close_issues_count/issues_count).toFixed(2)*100}%` :"50%"; + const fourth_per =issues_count > 0 ?`${parseFloat(open_issues_count/issues_count).toFixed(2)*100}%` :"50%"; + return(
    -- 2.34.1 From 66108083fd2e207e5a200d1edd754e141eadbff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Fri, 15 Oct 2021 15:22:22 +0800 Subject: [PATCH 50/73] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=B7=E6=B1=82=E9=A1=B5=E9=9D=A2=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E5=88=86=E6=94=AF=E5=AD=98=E5=9C=A8=E4=BD=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AD=98=E5=9C=A8bug=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E6=96=87=E4=BB=B6=E6=8C=89=E9=92=AE=E4=B8=8A?= =?UTF-8?q?=E7=A7=BB=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Diff.jsx | 4 ++-- src/forge/Merge/CreateMerge.js | 33 ++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index 6556023e3..8dad59fba 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -21,8 +21,8 @@ const Infos = styled.div` & .markdown-body table{ background: #f1f8ff; } - & .f-wrap-between{ - align-items: center; + & .btnblue{ + margin-top: 12px; } & .task-hide{ width: 65rem; diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index 0f6859071..c335d79fd 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -96,7 +96,6 @@ class CreateMerge extends Component { // 再获取对应的仓库列表、分支列表 // 再调用比较接口 const branchParams = getBranchParams(this.props.location.pathname); - console.log('componentDidMount branchParams', branchParams); this.getMergeInfo(branchParams); }; @@ -106,7 +105,6 @@ class CreateMerge extends Component { const newPathname = this.props.location.pathname; if (oldPathname !== newPathname) { const branchParams = getBranchParams(newPathname); - console.log('componentDidUpdate branchParams', branchParams); this.getMergeInfo(branchParams); } }; @@ -142,22 +140,29 @@ class CreateMerge extends Component { pull: pullBranch, }); - if (!noMergeBranch && !noPullBranch) { - this.compareProject(result.data.id, branchParams); - } else { - const _message = []; - noMergeBranch && _message.push('目标分支不存在'); - noPullBranch && _message.push('源分支不存在'); + //判断源分支是否存在 + if(noPullBranch){ this.setState({ showMessage: true, - defaultMessage: _message.join(' , '), + defaultMessage:'源分支不存在', isCompareSpin: false, }); + }else{ + if(pullOwner === mergeOwner){ + if (!noMergeBranch) { + this.compareProject(result.data.id, branchParams); + } else { + this.setState({ + showMessage: true, + defaultMessage:'目标分支不存在', + isCompareSpin: false, + }); + } + }else{ + this.getBranchList(branchParams); + } } } - if (pullOwner !== mergeOwner) { - this.getBranchList(branchParams); - } this.setState({ isSpin: false }); }) .catch((error) => { @@ -225,7 +230,9 @@ class CreateMerge extends Component { .length === 0; this.setState({ mergeBranches: result.data, - merge: noMergeBranch ? 'master' : mergeBranch, + showMessage: noMergeBranch, + defaultMessage: '目标分支不存在', + isCompareSpin: false, }); } this.setState({ isSpin: false }); -- 2.34.1 From 9de7ac7c904e1c2558a5c2cde693708af654e869 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 18 Oct 2021 11:15:38 +0800 Subject: [PATCH 51/73] =?UTF-8?q?=E6=98=93=E4=BF=AE=E3=80=81=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E8=AF=B7=E6=B1=82=E6=A0=87=E9=A2=98=EF=BC=9A=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E9=95=BF=E5=BA=A6=E3=80=81=E8=AF=A6=E6=83=85=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E3=80=81=E5=88=97=E8=A1=A8=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=95=BF=E5=BA=A6=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/MergeItem.js | 2 +- src/forge/Merge/MessageCount.js | 8 +++----- src/forge/Merge/merge_form.js | 2 +- src/forge/Order/Detail.js | 2 +- src/forge/Order/order_form.js | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js index dadd6d8a5..f1afabf90 100644 --- a/src/forge/Merge/MergeItem.js +++ b/src/forge/Merge/MergeItem.js @@ -64,7 +64,7 @@ class MergeItem extends Component { {item.name} diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 685f42355..3a880165a 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -340,8 +340,8 @@ class MessageCount extends Component {
    -
    -
    +
    +
    @@ -445,8 +445,7 @@ class MessageCount extends Component {
    -
    -
    +
    {operate && (
    -
    { data.issue.description ? diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js index 4716bdfca..e63781391 100644 --- a/src/forge/Merge/merge_form.js +++ b/src/forge/Merge/merge_form.js @@ -265,7 +265,7 @@ class MergeForm extends Component { }, ], initialValue: title, - })()} + })()} - {data && data.subject} + {data && data.subject} {data && data.priority && ( diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 0858ac527..3399a7feb 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -320,7 +320,7 @@ class order_form extends Component { message: "请填写易修标题", }, ] - })()} + })()}
    Date: Mon, 18 Oct 2021 11:30:20 +0800 Subject: [PATCH 52/73] =?UTF-8?q?=E9=9D=9E=E6=B1=89=E5=AD=97=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=BC=BA=E5=88=B6=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/MessageCount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 3a880165a..e2dabd865 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -344,7 +344,7 @@ class MessageCount extends Component {
    - + {data.issue.subject} -- 2.34.1 From dfa9b3d8352b1730b5d22616cd3c237dcc174392 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 18 Oct 2021 15:48:31 +0800 Subject: [PATCH 53/73] issue --- src/forge/Main/tree/Index.scss | 7 ++++++- src/forge/Merge/CreateMerge.js | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/tree/Index.scss b/src/forge/Main/tree/Index.scss index b077d9de9..f65a1c68f 100644 --- a/src/forge/Main/tree/Index.scss +++ b/src/forge/Main/tree/Index.scss @@ -22,9 +22,14 @@ border-bottom: none; } .treeinfo{ - max-width: 399px; + width: 399px; flex:1; flex-direction: column; + &>a{ + display: block; + width: 399px; + + } a:hover{ span{ color: #466AFF!important; diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index c335d79fd..9d8da7d39 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -369,6 +369,7 @@ class CreateMerge extends Component { onSelect={(e) => this.selectBrach('pull', e)} showSearch className="merge-flex1 flex1" + dropdownMatchSelectWidth={false} > {this.renderBrances(pullBranches)} @@ -395,6 +396,7 @@ class CreateMerge extends Component { onSelect={(e) => this.selectBrach('merge', e)} showSearch className="merge-flex1 flex1" + dropdownMatchSelectWidth={false} > {this.renderBrances(mergeBranches)} -- 2.34.1 From a2c5c1ea6f0187d433a5f5fd55aed68b515bd1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 18 Oct 2021 16:54:16 +0800 Subject: [PATCH 54/73] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/SecuritySetting/Index.jsx | 26 ++-- .../SecuritySetting/notice/manager/Index.jsx | 130 +++++++----------- 2 files changed, 59 insertions(+), 97 deletions(-) diff --git a/src/forge/SecuritySetting/Index.jsx b/src/forge/SecuritySetting/Index.jsx index f897dea19..d9fa1bfac 100644 --- a/src/forge/SecuritySetting/Index.jsx +++ b/src/forge/SecuritySetting/Index.jsx @@ -63,7 +63,7 @@ function Index(props){ {notice_url &&
    • 消息通知
    • -1 && pathname.indexOf("/settings/notice/config") == -1) || pathname.indexOf("/settings/notice/privateLetter")>-1 ?"active":""}>我的通知
    • - {/*
    • -1 ?"active":""}>通知管理
    • */} +
    • -1 ?"active":""}>通知管理
    }
    • 安全设置
    • @@ -73,18 +73,24 @@ function Index(props){ - ( - - )} - > ( )} > + ( + + )} + > + ( + + )} + > ( @@ -103,12 +109,6 @@ function Index(props){ )} > - ( - - )} - > diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx index ebe84beac..da1aac8d6 100644 --- a/src/forge/SecuritySetting/notice/manager/Index.jsx +++ b/src/forge/SecuritySetting/notice/manager/Index.jsx @@ -1,10 +1,36 @@ -import { Button, Checkbox } from "antd"; -import React from "react"; - +import { Checkbox } from "antd"; +import React, { useEffect, useState } from "react"; +import axios from 'axios'; import './Index.scss'; function NoticeManager(props){ + const {current_user} = props; + const [settingTypes, setSettingTypes] = useState(); + const [userNotification, setUserNotification] = useState(); + const [userEmail, setUserEmail] = useState(); + + function getUserSettings(){ + axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{ + if(response && response.status === 200 ){ + setUserEmail(response.data.email_body); + setUserNotification(response.data.notification_body); + } + }) + } + + useEffect(()=>{ + axios.get("/template_message_settings.json").then((response)=>{ + if(response && response.status === 200 ){ + setSettingTypes(response.data.setting_types); + } + }) + getUserSettings(); + },[]) + + console.log('settingTypes',settingTypes); + console.log('userNotification',userNotification,'userEmail',userEmail); + console.log(userNotification.ins) return(
      @@ -12,87 +38,23 @@ function NoticeManager(props){
      您可以通过通知管理来选择接受通知的方式 -
      - 我创建或负责的 -
      -
      -
      易修状态变更
      - 站内信 - 邮件 -
      -
      -
      易修截止日期到达最后一天
      - 站内信 - 邮件 -
      -
      -
      合并请求状态变更
      - 站内信 - 邮件 -
      -
      -
      易修有新的评论
      - 站内信 - 邮件 -
      -
      -
      合并请求有新的评论
      - 站内信 - 邮件 -
      - -
      - 我管理的仓库 -
      -
      -
      被关注
      - 站内信 - 邮件 -
      -
      -
      被点赞
      - 站内信 - 邮件 -
      -
      -
      被复刻
      - 站内信 - 邮件 -
      -
      -
      有新的里程碑
      - 站内信 - 邮件 -
      - -
      - 我关注的仓库 -
      -
      -
      被删除
      - 站内信 - 邮件 -
      -
      -
      被转移
      - 站内信 - 邮件 -
      -
      -
      有新的易修
      - 站内信 - 邮件 -
      -
      -
      有新的合并请求
      - 站内信 - 邮件 -
      -
      -
      有新的版本发布
      - 站内信 - 邮件 -
      + {settingTypes && settingTypes.map((item,key)=>{ + return( + item.type_name &&
      +
      {item.type_name}
      + {item.settings.map((i, k) => { + console.log(userNotification.get(item.type.substring(item.type.indexOf("::")+2)+"::"+i.key)); + return ( +
      +
      {i.name}
      + 站内信 + 邮件 +
      + ) + })} +
      + ) + })}
      ) -- 2.34.1 From e7a322e0385c5c06b64e1e08fdabd89aaafe8096 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 18 Oct 2021 17:13:52 +0800 Subject: [PATCH 55/73] =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F-mark?= =?UTF-8?q?down=E6=B8=B2=E6=9F=93=E6=9C=89=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/NoticeModal/Index.scss | 11 ++++------- src/forge/Component/NoticeModal/SystemNotice.jsx | 6 ++++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/forge/Component/NoticeModal/Index.scss b/src/forge/Component/NoticeModal/Index.scss index 259be8546..18e4dcda0 100644 --- a/src/forge/Component/NoticeModal/Index.scss +++ b/src/forge/Component/NoticeModal/Index.scss @@ -39,13 +39,10 @@ .nContent{ padding:20px 34px; background-color: #fff; - .nMaindesc{ - height: 90px; - font-size: 15px; - font-weight: 400; - color: #000000; - line-height: 30px; - } + line-height: 30px; + font-size: 15px; + font-weight: 400; + color: #333; .realmName{ margin-top: 20px; display: flex; diff --git a/src/forge/Component/NoticeModal/SystemNotice.jsx b/src/forge/Component/NoticeModal/SystemNotice.jsx index cb3fccf03..32c864ab1 100644 --- a/src/forge/Component/NoticeModal/SystemNotice.jsx +++ b/src/forge/Component/NoticeModal/SystemNotice.jsx @@ -26,10 +26,12 @@ function SystemNotice({system_notification,history}){ // } // }).catch(error=>{}) // } + console.log("cookies before:",cookie.load('notice_stage')) ; cookie.remove('notice_stage'); - let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 + // let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 + let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 cookie.save('notice_stage', true,{ expires: inFifteenMinutes }); - console.log("cookies:",cookie.load('notice_stage')) ; + console.log("cookies after:",cookie.load('notice_stage')) ; setVisible(false); } -- 2.34.1 From 644e3c3f73f8928a68830f51c2ea0d02aa380409 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 18 Oct 2021 17:19:20 +0800 Subject: [PATCH 56/73] =?UTF-8?q?cookie=E5=A4=B1=E6=95=88=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=94=B9=E4=B8=BA=E4=B8=80=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/NoticeModal/SystemNotice.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Component/NoticeModal/SystemNotice.jsx b/src/forge/Component/NoticeModal/SystemNotice.jsx index 32c864ab1..917b87c85 100644 --- a/src/forge/Component/NoticeModal/SystemNotice.jsx +++ b/src/forge/Component/NoticeModal/SystemNotice.jsx @@ -28,8 +28,8 @@ function SystemNotice({system_notification,history}){ // } console.log("cookies before:",cookie.load('notice_stage')) ; cookie.remove('notice_stage'); - // let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 - let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 + let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 + // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 cookie.save('notice_stage', true,{ expires: inFifteenMinutes }); console.log("cookies after:",cookie.load('notice_stage')) ; setVisible(false); -- 2.34.1 From b6b19eabe92fba29b8632a7eaca7217105fee844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 18 Oct 2021 17:28:40 +0800 Subject: [PATCH 57/73] =?UTF-8?q?=E4=BB=93=E5=BA=93=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E8=B0=83=E7=94=A8compare=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/CreateMerge.js | 65 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index c335d79fd..b766c023e 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -150,7 +150,7 @@ class CreateMerge extends Component { }else{ if(pullOwner === mergeOwner){ if (!noMergeBranch) { - this.compareProject(result.data.id, branchParams); + this.compareProject(true, branchParams); } else { this.setState({ showMessage: true, @@ -172,53 +172,51 @@ class CreateMerge extends Component { }; // compare接口,获取分支对比信息 - compareProject = (baseid, branchParams) => { + compareProject = (sameProject, branchParams) => { // const { project } = this.props; // const { owner, projectsId } = this.props.match.params; - const projectObj = this.props.project; const { pullOwner, pullBranch, mergeOwner, mergeBranch, projectId } = branchParams; let url = `/${mergeOwner}/${projectId}/compare`; - if (projectObj) { - if (baseid === projectObj.id) { - url += `/${pullBranch}...${mergeBranch}.json`; - } else { - url += `/${mergeBranch}...${pullOwner}/${projectId}:${pullBranch}.json`; - } - this.setState({ isSpin: false, isCompareSpin: true }); - axios - .get(url) - .then((result) => { - if (result) { - if (result.data.status === 0) { - this.setState({ - showMessage: false, - }); - } else { - this.setState({ - showMessage: true, - defaultMessage: result.data.message, - }); - } + if (sameProject) { + url += `/${pullBranch}...${mergeBranch}.json`; + } else { + url += `/${mergeBranch}...${pullOwner}/${projectId}:${pullBranch}.json`; + } + this.setState({ isSpin: false, isCompareSpin: true }); + axios + .get(url) + .then((result) => { + if (result) { + if (result.data.status === 0) { this.setState({ - comparesData: result.data, + showMessage: false, + }); + } else { + this.setState({ + showMessage: true, + defaultMessage: result.data.message, }); } this.setState({ - isFirstLoading: false, - isSpin: false, - isCompareSpin: false, + comparesData: result.data, }); - }) - .catch((error) => { - this.setState({ isSpin: false, isCompareSpin: false }); + } + this.setState({ + isFirstLoading: false, + isSpin: false, + isCompareSpin: false, }); - } + }) + .catch((error) => { + this.setState({ isSpin: false, isCompareSpin: false }); + }); }; // 根据所有者、仓库名,获取分支列表,目前仅涉及目标仓库分支查询 - getBranchList = ({ mergeOwner, projectId, mergeBranch }) => { + getBranchList = (branchParams) => { + const { mergeOwner, projectId, mergeBranch } = branchParams; this.setState({ isSpin: true }); const url = `/${mergeOwner}/${projectId}/pulls/get_branches.json`; axios @@ -234,6 +232,7 @@ class CreateMerge extends Component { defaultMessage: '目标分支不存在', isCompareSpin: false, }); + !noMergeBranch && this.compareProject(false, branchParams); } this.setState({ isSpin: false }); }) -- 2.34.1 From 11b92ac52bce6a93bd8d0a20ded2687febf0513d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 19 Oct 2021 09:00:00 +0800 Subject: [PATCH 58/73] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/SecuritySetting/notice/manager/Index.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx index da1aac8d6..d45dc3713 100644 --- a/src/forge/SecuritySetting/notice/manager/Index.jsx +++ b/src/forge/SecuritySetting/notice/manager/Index.jsx @@ -30,7 +30,6 @@ function NoticeManager(props){ console.log('settingTypes',settingTypes); console.log('userNotification',userNotification,'userEmail',userEmail); - console.log(userNotification.ins) return(
      @@ -43,12 +42,12 @@ function NoticeManager(props){ item.type_name &&
      {item.type_name}
      {item.settings.map((i, k) => { - console.log(userNotification.get(item.type.substring(item.type.indexOf("::")+2)+"::"+i.key)); + // console.log(userEmail[item.type.substring(item.type.indexOf("::")+2)+"::"+i.key]); return (
      {i.name}
      - 站内信 - 邮件 + 站内信 + 邮件
      ) })} -- 2.34.1 From fe1bacb98417a88453e9b72f48e48b462133716b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 19 Oct 2021 10:26:36 +0800 Subject: [PATCH 59/73] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=AE=A1=E7=90=86+?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9F=BA=E6=9C=AC=E8=B5=84=E6=96=99=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84consolo=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecuritySetting/notice/manager/Index.jsx | 46 +++++++++++-------- src/forge/users/Material/Base.jsx | 1 - 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx index d45dc3713..ca16f25ec 100644 --- a/src/forge/SecuritySetting/notice/manager/Index.jsx +++ b/src/forge/SecuritySetting/notice/manager/Index.jsx @@ -10,26 +10,36 @@ function NoticeManager(props){ const [userNotification, setUserNotification] = useState(); const [userEmail, setUserEmail] = useState(); - function getUserSettings(){ + function onChange(type,e,setting){ + let notification_body = userNotification; + let email_body = userEmail; + if(type){//站内信 + notification_body[setting] = e.target.checked; + }else{//邮件 + email_body[setting] = e.target.checked; + } + axios.post(`/users/${current_user.login}/template_message_settings/update_setting.json`,{ + setting:{ + notification_body:notification_body, + email_body:email_body + } + }) + } + + useEffect(()=>{ + axios.get("/template_message_settings.json").then(response => { + if (response && response.status === 200) { + setSettingTypes(response.data.setting_types); + } + }) axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{ if(response && response.status === 200 ){ setUserEmail(response.data.email_body); setUserNotification(response.data.notification_body); } }) - } - - useEffect(()=>{ - axios.get("/template_message_settings.json").then((response)=>{ - if(response && response.status === 200 ){ - setSettingTypes(response.data.setting_types); - } - }) - getUserSettings(); },[]) - console.log('settingTypes',settingTypes); - console.log('userNotification',userNotification,'userEmail',userEmail); return(
      @@ -37,17 +47,17 @@ function NoticeManager(props){
      您可以通过通知管理来选择接受通知的方式 - {settingTypes && settingTypes.map((item,key)=>{ + {settingTypes && userNotification && userEmail && settingTypes.map((item,key)=>{ return( - item.type_name &&
      + item.type_name &&
      {item.type_name}
      {item.settings.map((i, k) => { - // console.log(userEmail[item.type.substring(item.type.indexOf("::")+2)+"::"+i.key]); + const setting = item.type.substring(item.type.indexOf("::")+2)+"::"+i.key; return ( -
      +
      {i.name}
      - 站内信 - 邮件 + {onChange(true,e,setting)}}>站内信 + {onChange(false,e,setting)}}>邮件
      ) })} diff --git a/src/forge/users/Material/Base.jsx b/src/forge/users/Material/Base.jsx index f9707ab0d..61a9d6f1c 100644 --- a/src/forge/users/Material/Base.jsx +++ b/src/forge/users/Material/Base.jsx @@ -11,7 +11,6 @@ export default Form.create()( const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form; // const { username } = props && props.match && props.match.params; const { resetUserInfo , current_user } = props; - console.log(props); useEffect(()=>{ if(current_user && current_user.login){ -- 2.34.1 From 31af77e7040670d30877d24976186f38b960f788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 19 Oct 2021 10:45:15 +0800 Subject: [PATCH 60/73] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecuritySetting/notice/manager/Index.jsx | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx index ca16f25ec..5ba82d60c 100644 --- a/src/forge/SecuritySetting/notice/manager/Index.jsx +++ b/src/forge/SecuritySetting/notice/manager/Index.jsx @@ -23,6 +23,19 @@ function NoticeManager(props){ notification_body:notification_body, email_body:email_body } + }).then(response=>{ + if(response && response.status === 0){ + getUserSettings(); + } + }) + } + + function getUserSettings(){ + axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{ + if(response && response.status === 200 ){ + setUserEmail(response.data.email_body); + setUserNotification(response.data.notification_body); + } }) } @@ -32,12 +45,7 @@ function NoticeManager(props){ setSettingTypes(response.data.setting_types); } }) - axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{ - if(response && response.status === 200 ){ - setUserEmail(response.data.email_body); - setUserNotification(response.data.notification_body); - } - }) + getUserSettings(); },[]) return( -- 2.34.1 From 2c867f98566a2def04183f9d400d0ff6a48faf50 Mon Sep 17 00:00:00 2001 From: caishi Date: Wed, 20 Oct 2021 11:05:38 +0800 Subject: [PATCH 61/73] =?UTF-8?q?cookie=E8=AE=BE=E7=BD=AEpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Component/NoticeModal/SystemNotice.jsx | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/forge/Component/NoticeModal/SystemNotice.jsx b/src/forge/Component/NoticeModal/SystemNotice.jsx index 917b87c85..817d7b8ef 100644 --- a/src/forge/Component/NoticeModal/SystemNotice.jsx +++ b/src/forge/Component/NoticeModal/SystemNotice.jsx @@ -12,26 +12,15 @@ function SystemNotice({system_notification,history}){ if(system_notification && !cookie.load('notice_stage')){ setVisible(true); } - },[system_notification]) + },[system_notification,history.location]) function sureContinue() { - // if(login && ( system_notification && system_notification.id )){ - // const url = `/users/${login}/system_notification_histories.json`; - // axios.post(url,{ - // system_notification_id:system_notification.id - // }).then(result=>{ - // if(result && result.status === 0){ - // setVisible(false); - // hideSystemNotice(); - // } - // }).catch(error=>{}) - // } - console.log("cookies before:",cookie.load('notice_stage')) ; cookie.remove('notice_stage'); - let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 - // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 - cookie.save('notice_stage', true,{ expires: inFifteenMinutes }); - console.log("cookies after:",cookie.load('notice_stage')) ; + + // let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 + let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 + cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" }); + setVisible(false); } -- 2.34.1 From 76c2d205eb6799fcb9a0eb4cc7403668cc0879e6 Mon Sep 17 00:00:00 2001 From: caishi Date: Wed, 20 Oct 2021 11:06:49 +0800 Subject: [PATCH 62/73] =?UTF-8?q?cookie=E8=AE=BE=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/NoticeModal/SystemNotice.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Component/NoticeModal/SystemNotice.jsx b/src/forge/Component/NoticeModal/SystemNotice.jsx index 817d7b8ef..1560c1ffc 100644 --- a/src/forge/Component/NoticeModal/SystemNotice.jsx +++ b/src/forge/Component/NoticeModal/SystemNotice.jsx @@ -17,8 +17,8 @@ function SystemNotice({system_notification,history}){ function sureContinue() { cookie.remove('notice_stage'); - // let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 - let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 + let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天 + // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟 cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" }); setVisible(false); -- 2.34.1 From d47c725b96bf3bc92850957c9e2f14e45d679179 Mon Sep 17 00:00:00 2001 From: caishi Date: Wed, 20 Oct 2021 15:25:35 +0800 Subject: [PATCH 63/73] =?UTF-8?q?pr=E5=88=86=E6=94=AF=E8=BF=87=E9=95=BF?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E6=97=B6=E5=BA=94=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/CreateMerge.js | 4 ++-- src/forge/Merge/merge.css | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index 2659f2e83..b039c6347 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -367,7 +367,7 @@ class CreateMerge extends Component { value={pull} onSelect={(e) => this.selectBrach('pull', e)} showSearch - className="merge-flex1 flex1" + className="merge-flex1 flex1 matchwidth" dropdownMatchSelectWidth={false} > {this.renderBrances(pullBranches)} @@ -394,7 +394,7 @@ class CreateMerge extends Component { value={merge} onSelect={(e) => this.selectBrach('merge', e)} showSearch - className="merge-flex1 flex1" + className="merge-flex1 flex1 matchwidth" dropdownMatchSelectWidth={false} > {this.renderBrances(mergeBranches)} diff --git a/src/forge/Merge/merge.css b/src/forge/Merge/merge.css index 3ea2620cb..1d635028e 100644 --- a/src/forge/Merge/merge.css +++ b/src/forge/Merge/merge.css @@ -213,4 +213,8 @@ form .ant-cascader-picker, form .ant-select { .mergeRequest .folders{ /* width: 72rem; */ width: 100%; - } \ No newline at end of file + } + + .matchwidth .ant-select-selection__rendered{ + max-width: 200px; + } \ No newline at end of file -- 2.34.1 From 057881097d79a4607088d0a384a8bd0a6dbe3310 Mon Sep 17 00:00:00 2001 From: caishi Date: Wed, 20 Oct 2021 16:26:23 +0800 Subject: [PATCH 64/73] =?UTF-8?q?pr=20=E5=88=86=E6=94=AF=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/CreateMerge.js | 2 ++ src/forge/Merge/MergeItem.js | 4 ++-- src/forge/Merge/MessageCount.js | 4 ++-- src/forge/Merge/UpdateMerge.js | 8 ++++---- src/forge/Merge/merge.css | 7 ++++++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index b039c6347..d7a320099 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -369,6 +369,7 @@ class CreateMerge extends Component { showSearch className="merge-flex1 flex1 matchwidth" dropdownMatchSelectWidth={false} + dropdownClassName="overlihide" > {this.renderBrances(pullBranches)} @@ -396,6 +397,7 @@ class CreateMerge extends Component { showSearch className="merge-flex1 flex1 matchwidth" dropdownMatchSelectWidth={false} + dropdownClassName="overlihide" > {this.renderBrances(mergeBranches)} diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js index f1afabf90..61477c142 100644 --- a/src/forge/Merge/MergeItem.js +++ b/src/forge/Merge/MergeItem.js @@ -110,7 +110,7 @@ class MergeItem extends Component { {item.is_original ? item.fork_project_user @@ -134,7 +134,7 @@ class MergeItem extends Component { {/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */} {project_author_name}:{item.pull_request_base} diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index e2dabd865..6d01e8a37 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -366,7 +366,7 @@ class MessageCount extends Component { {data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {data.pull_request && data.pull_request.head} @@ -381,7 +381,7 @@ class MessageCount extends Component { {data.issue.project_author_name}:{data.pull_request.base} diff --git a/src/forge/Merge/UpdateMerge.js b/src/forge/Merge/UpdateMerge.js index 001bedd57..8918db6eb 100644 --- a/src/forge/Merge/UpdateMerge.js +++ b/src/forge/Merge/UpdateMerge.js @@ -64,12 +64,12 @@ class UpdateMerge extends Component {
      源分支:
      - {" "} {" "} @@ -83,12 +83,12 @@ class UpdateMerge extends Component {
      目标分支 :
      {" "} - {" "} {" "} diff --git a/src/forge/Merge/merge.css b/src/forge/Merge/merge.css index 1d635028e..d61543b49 100644 --- a/src/forge/Merge/merge.css +++ b/src/forge/Merge/merge.css @@ -40,6 +40,7 @@ form .ant-cascader-picker, form .ant-select { } .merge-header-button{ background:rgba(241,248,255,1); + text-align: left; } .width70{ width:70%; @@ -216,5 +217,9 @@ form .ant-cascader-picker, form .ant-select { } .matchwidth .ant-select-selection__rendered{ - max-width: 200px; + width: 200px; + } + .overlihide li{ + max-width: 450px; + } \ No newline at end of file -- 2.34.1 From 13c58faad85f4d2619704bc78ed569337bb26218 Mon Sep 17 00:00:00 2001 From: caishi Date: Thu, 21 Oct 2021 10:37:10 +0800 Subject: [PATCH 65/73] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3-=E6=A0=B9=E6=8D=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=AF=B9=E5=BA=94=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Branch/SelectOverlay.jsx | 20 ++++++-------------- src/forge/Main/CoderDepot.jsx | 4 ++-- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/forge/Branch/SelectOverlay.jsx b/src/forge/Branch/SelectOverlay.jsx index e9c4aae4f..0be567324 100644 --- a/src/forge/Branch/SelectOverlay.jsx +++ b/src/forge/Branch/SelectOverlay.jsx @@ -2,7 +2,7 @@ import React , { useState , useEffect } from 'react'; import { Input , Spin , Menu } from 'antd'; import { getBranch , getTag } from '../GetData/getData'; -function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owner , visible }) { +function SelectOverlay({ changeBranch , tagflag , projectsId , owner , visible }) { const [ inputValue , setInputValue] = useState(undefined); const [ nav , setNav ] = useState(0); const [ isSpin , setIsSpin ] = useState(true); @@ -11,21 +11,13 @@ function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owne const [ datas , setDatas ] = useState(undefined); const [ keys ,setKeys] = useState("branch"); - // useEffect(()=>{ - // if(visible){ - // setKeys("branch"); - // getBranchs(projectsId,owner); - // setIsSpin(true); - // } - // },[visible]) - useEffect(()=>{ - if(branchList){ - setData(branchList); - setDatas(branchList); - setIsSpin(false); + if(visible){ + setKeys("branch"); + getBranchs(projectsId,owner); + setIsSpin(true); } - },[branchList]) + },[visible]) async function getBranchs(id,owner){ let result = await getBranch(id,owner); diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 8dd5e4681..f50c134a3 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -407,14 +407,14 @@ function CoderDepot(props){ 分支 - {projectDetail && projectDetail.branches && projectDetail.branches.total_count} + {projectDetail && projectDetail.branches_count} 标签 - {projectDetail && projectDetail.tags && projectDetail.tags.total_count} + {projectDetail && projectDetail.tags_count} -- 2.34.1 From cc62bde5b48dd34e5dc330c301e1acc24fb7cdd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 21 Oct 2021 11:02:15 +0800 Subject: [PATCH 66/73] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=20=E6=8F=90=E4=BA=A4=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A4=9A=E8=A1=8C=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/list.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss index 83b4d5ee7..59589fb62 100644 --- a/src/forge/Main/list.scss +++ b/src/forge/Main/list.scss @@ -734,7 +734,9 @@ a.color-grey-ccc:hover{ border: 1px solid rgba(42, 97, 255, 0.23); border-radius: 4px; margin-left: 16px; - align-items: center; + & .treecopy{ + margin-top: 20px; + } & .markdown-body table{ background: #FAFCFF; } -- 2.34.1 From ae12618c0cc93a9e195df15a72758b53547942a4 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 25 Oct 2021 10:45:40 +0800 Subject: [PATCH 67/73] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Detail.js | 5 ----- src/forge/Main/IndexItem.js | 2 +- src/forge/Settings/Setting.js | 5 +++++ src/forge/Team/ListItem.jsx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 06d2fc44b..b4d17a81c 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -508,11 +508,6 @@ class Detail extends Component { this.textFunc(projectDetail.forked_from_project_id, projectDetail.fork_info) : "" } - { - projectDetail && projectDetail.type && projectDetail.type !== 0 ? - 导入于 {projectDetail.mirror_url} - : "" - }
      diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 0cba9123e..15d7990ba 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -55,7 +55,7 @@ class IndexItem extends Component { { item.type && item.type === 1 ? - + :"" } diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index deccb3daf..86383fc79 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -267,6 +267,11 @@ class Setting extends Component { }, ], })()} + { + projectDetail && projectDetail.type && projectDetail.type !== 0 ? + 该项目导入于 {projectDetail.mirror_url} + : "" + }
      可见性 diff --git a/src/forge/Team/ListItem.jsx b/src/forge/Team/ListItem.jsx index a908f80bb..a1f4fa89b 100644 --- a/src/forge/Team/ListItem.jsx +++ b/src/forge/Team/ListItem.jsx @@ -16,7 +16,7 @@ function ListItem({item,key,OIdentifier}) { : - + :"" } -- 2.34.1 From 0e6cb3954a816504495e98fae58b1b190d396cac Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 25 Oct 2021 11:09:13 +0800 Subject: [PATCH 68/73] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=A1=B5icon=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/IndexItem.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 15d7990ba..4ddd76330 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -52,12 +52,6 @@ class IndexItem extends Component { :"" } - { - item.type && item.type === 1 ? - - - :"" - } { -- 2.34.1 From aeff357660ace0991da45c8493db7f9af519dd26 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 25 Oct 2021 11:09:41 +0800 Subject: [PATCH 69/73] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=A1=B5icon=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/IndexItem.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 4ddd76330..15d7990ba 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -52,6 +52,12 @@ class IndexItem extends Component { :"" } + { + item.type && item.type === 1 ? + + + :"" + } { -- 2.34.1 From 60da6bd110d55a9ee10ee43a638c2bd1fb15b7f1 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 25 Oct 2021 15:46:57 +0800 Subject: [PATCH 70/73] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Team/ListItem.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/forge/Team/ListItem.jsx b/src/forge/Team/ListItem.jsx index a1f4fa89b..8ccfdda23 100644 --- a/src/forge/Team/ListItem.jsx +++ b/src/forge/Team/ListItem.jsx @@ -15,9 +15,7 @@ function ListItem({item,key,OIdentifier}) { : - - - :"" + :"" } -- 2.34.1 From 7872d5ecab95974de47fd50782ec1d6fefe95f8c Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 25 Oct 2021 15:56:06 +0800 Subject: [PATCH 71/73] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/IndexItem.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 15d7990ba..4ddd76330 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -52,12 +52,6 @@ class IndexItem extends Component { :"" } - { - item.type && item.type === 1 ? - - - :"" - } { -- 2.34.1 From 746f552a21dc5e2d5451cf6aa508fc81974b1f44 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 25 Oct 2021 16:37:50 +0800 Subject: [PATCH 72/73] issue --- src/forge/Team/ListItem.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/forge/Team/ListItem.jsx b/src/forge/Team/ListItem.jsx index 8ccfdda23..ab9d64f27 100644 --- a/src/forge/Team/ListItem.jsx +++ b/src/forge/Team/ListItem.jsx @@ -10,12 +10,10 @@ function ListItem({item,key,OIdentifier}) { {item.name} { item.forked_from_project_id && } { - item.type && item.type !== 0 ? - item.type === 2 ? + item.type && item.type === 2 ? - : - :"" + :"" } -- 2.34.1 From 61ee3fe36f6585b55bd26a8aeafdd316a8dab48f Mon Sep 17 00:00:00 2001 From: caishi Date: Thu, 28 Oct 2021 17:25:50 +0800 Subject: [PATCH 73/73] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/login/EducoderLogin.js | 6 +- src/modules/login/Trialapplication.js | 4 +- src/modules/login/Trialapplicationysl.js | 4 +- src/modules/user/FindPasswordComponent.js | 2 +- src/modules/user/LoginRegisterComponent.js | 68 +++++++--------------- 5 files changed, 28 insertions(+), 56 deletions(-) diff --git a/src/modules/login/EducoderLogin.js b/src/modules/login/EducoderLogin.js index 9a5526734..c687f5f50 100644 --- a/src/modules/login/EducoderLogin.js +++ b/src/modules/login/EducoderLogin.js @@ -153,21 +153,21 @@ class EducoderLogin extends Component { justifyContent: "center", width: "100%", }}> -
      © {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
      +
      © {moment().year()} GitLink | 确实开源京ICP备13000930号GitLink   &   IntelliDE inside.
      : this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined?
      -
      © {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
      +
      © {moment().year()} GitLink | 确实开源京ICP备13000930号GitLink   &   IntelliDE inside.
      :this.props.mygetHelmetapi.main_site===true?
      -
      © {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
      +
      © {moment().year()} GitLink | 确实开源京ICP备13000930号GitLink   &   IntelliDE inside.
      :"" } diff --git a/src/modules/login/Trialapplication.js b/src/modules/login/Trialapplication.js index 5cb181663..4f23406e7 100644 --- a/src/modules/login/Trialapplication.js +++ b/src/modules/login/Trialapplication.js @@ -142,12 +142,12 @@ class Trialapplication extends Component { if (this.state.Phonenumberisnotcobool === false) { if (this.state.login.length === 0) { this.setState({ - Phonenumberisnotco: "请输入正确的手机号或邮箱", + Phonenumberisnotco: "请输入正确的邮箱账号", }) return } else { this.setState({ - Phonenumberisnotco: "请输入正确的手机号或邮箱", + Phonenumberisnotco: "请输入正确的邮箱账号", }) } return; diff --git a/src/modules/login/Trialapplicationysl.js b/src/modules/login/Trialapplicationysl.js index 25522e862..68c4a2445 100644 --- a/src/modules/login/Trialapplicationysl.js +++ b/src/modules/login/Trialapplicationysl.js @@ -158,12 +158,12 @@ class Trialapplicationysl extends Component { if (this.state.Phonenumberisnotcobool === false) { if (this.state.login.length === 0) { this.setState({ - Phonenumberisnotco: "请输入正确的手机号或邮箱", + Phonenumberisnotco: "请输入正确的邮箱账号", }) return } else { this.setState({ - Phonenumberisnotco: "请输入正确的手机号或邮箱", + Phonenumberisnotco: "请输入正确的邮箱账号", }) } return; diff --git a/src/modules/user/FindPasswordComponent.js b/src/modules/user/FindPasswordComponent.js index 85f0285a8..c753c66e8 100644 --- a/src/modules/user/FindPasswordComponent.js +++ b/src/modules/user/FindPasswordComponent.js @@ -699,7 +699,7 @@ class LoginRegisterComponent extends Component { {/*onBlur={(e) => this.inputOnBlur(e)}*/} this.inputOnBlurzhuche(e)} onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}> { diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js index db369458b..f32581744 100644 --- a/src/modules/user/LoginRegisterComponent.js +++ b/src/modules/user/LoginRegisterComponent.js @@ -7,6 +7,7 @@ import axios from 'axios'; import CheckInputysl1 from './CheckInputysl'; import CheckInputysl2 from './CheckInputysl'; import Notcompletedysl from './Notcompletedysl'; +import Educoder from '../login/educoder.png'; import './common.css' import './commontwo.css' const { TabPane } = Tabs; @@ -1039,7 +1040,7 @@ class LoginRegisterComponent extends Component { } - this.postLogin()} size={"large"}>登录 - {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?

      - - ———————— 快速登录 ———————— -

      -

      :

      - ———————— 快速登录 ———————— -

      -

      :""} +

      + ———————— 快速登录 ———————— +

      + + educoder登录 + +
      +

      } @@ -1115,7 +1102,7 @@ class LoginRegisterComponent extends Component { { weixinlogin===false&&parseInt(tab[0])==1 &&
      - 我已阅读并同意 - 《服务协议条款》 + 《服务协议条款》 :""} - {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?this.state.isphone===true?

      - - ———————— 快速登录 ———————— -

      -

      :

      - ———————— 快速登录 ———————— -

      -

      :"" - } +

      + ———————— 快速登录 ———————— +

      + + educoder登录 + +
      +

      } -- 2.34.1