From 994f3e9716925ed97c2804633a70be303a5c4547 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Mon, 8 Jun 2020 09:55:16 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/UsersList/common_users.js | 2 +- src/forge/UsersList/praise_users.js | 2 +- src/forge/UsersList/user_list.js | 11 ++++++++--- src/forge/UsersList/watch_users.js | 3 ++- src/forge/users/Infos.js | 16 ---------------- src/forge/users/common_lists.js | 2 +- src/forge/users/fan_users.js | 4 ++-- src/forge/users/watch_users.js | 5 ++--- 8 files changed, 17 insertions(+), 28 deletions(-) diff --git a/src/forge/UsersList/common_users.js b/src/forge/UsersList/common_users.js index c724de63..8f996a7f 100644 --- a/src/forge/UsersList/common_users.js +++ b/src/forge/UsersList/common_users.js @@ -93,7 +93,7 @@ class CommonUsers extends Component { {count === 0 ? ( ) : ( - + )} diff --git a/src/forge/UsersList/praise_users.js b/src/forge/UsersList/praise_users.js index 22c9a807..dbd7a73b 100644 --- a/src/forge/UsersList/praise_users.js +++ b/src/forge/UsersList/praise_users.js @@ -22,7 +22,7 @@ class PraiseUsers extends Component { const { projectId } = this.state; return (
- {projectId && } + {projectId && }
); diff --git a/src/forge/UsersList/user_list.js b/src/forge/UsersList/user_list.js index c6e6c9f5..0e53f88d 100644 --- a/src/forge/UsersList/user_list.js +++ b/src/forge/UsersList/user_list.js @@ -1,7 +1,7 @@ import React, { Component } from "react"; -import { Link } from "react-router-dom"; import { getImageUrl } from "educoder"; import FocusButton from "./focus_button"; +import { Button } from "antd"; import "./list.css"; class UserList extends Component { constructor(props) { @@ -9,7 +9,7 @@ class UserList extends Component { } render() { - const { users, userClass } = this.props; + const { users, userClass, current_user } = this.props; const renderList = () => { if (users && users.length > 0) { return users.map((item, key) => { @@ -41,7 +41,12 @@ class UserList extends Component { 加入时间:{item.format_time} - + { + current_user && current_user.login === item.login ? + + : + + } diff --git a/src/forge/UsersList/watch_users.js b/src/forge/UsersList/watch_users.js index 6c477ddb..7817d639 100644 --- a/src/forge/UsersList/watch_users.js +++ b/src/forge/UsersList/watch_users.js @@ -20,9 +20,10 @@ class WatchUsers extends Component { render() { const { projectId } = this.state; + console.log("watcher_users", this.props.current_user) return (
- {projectId && } + {projectId && }
); diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index bf9df3a5..f943ac23 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -287,22 +287,6 @@ class Infos extends Component { )} -
- - { - return ; - }} - > - {/* { - return ; - }} - > */} - -
); diff --git a/src/forge/users/common_lists.js b/src/forge/users/common_lists.js index afee3331..1a5dbde0 100644 --- a/src/forge/users/common_lists.js +++ b/src/forge/users/common_lists.js @@ -104,7 +104,7 @@ class CommonList extends Component { {users && users.length > 0 ? (
- +
) : ( diff --git a/src/forge/users/fan_users.js b/src/forge/users/fan_users.js index 795921e9..b487a687 100644 --- a/src/forge/users/fan_users.js +++ b/src/forge/users/fan_users.js @@ -10,10 +10,10 @@ class FanUsers extends Component { } render() { - const {user} = this.props + const {user, current_user} = this.props return (
- {user && user.login && } + {user && user.login && }
); } diff --git a/src/forge/users/watch_users.js b/src/forge/users/watch_users.js index 873dfcb1..ef39eb11 100644 --- a/src/forge/users/watch_users.js +++ b/src/forge/users/watch_users.js @@ -1,5 +1,4 @@ import React, { Component } from "react"; -// import { Input, Spin, Pagination } from "antd"; import CommonLists from "./common_lists" class WatcherUsers extends Component { constructor(props) { @@ -10,10 +9,10 @@ class WatcherUsers extends Component { } render() { - const {user} = this.props + const {user, current_user} = this.props return (
- {user && user.login && } + {user && user.login && }
); } From 75768cf8b0cd6cd040f4456c0322aa50b174d7d7 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Mon, 8 Jun 2020 11:37:15 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9button=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=8F=8A=E5=85=B6=E4=BB=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Newfile/UserSubmitComponent.js | 2 +- src/forge/Order/order_form.js | 30 ++++++++++-------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js index 4f5b5dfb..21e5c32b 100644 --- a/src/forge/Newfile/UserSubmitComponent.js +++ b/src/forge/Newfile/UserSubmitComponent.js @@ -216,7 +216,7 @@ class UserSubmitComponent extends Component { -
+
@@ -494,21 +492,7 @@ class order_form extends Component { )} - - {getFieldDecorator("done_ratio", { - rules: [ - { - required: true, - message: "请选择完成度", - }, - ], - initialValue: done_ratio, - })( - - )} - + {getFieldDecorator("fixed_version_id", { rules: [], @@ -571,6 +555,16 @@ class order_form extends Component { onChange={this.changeEndTime} /> + + {getFieldDecorator("done_ratio", { + rules: [], + initialValue: done_ratio, + })( + + )} + {/* Date: Tue, 9 Jun 2020 14:13:53 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=AF=84?= =?UTF-8?q?=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Order/Detail.js | 171 ++++++------ src/forge/Order/order.css | 37 ++- src/forge/Upload/attachment.js | 2 +- src/forge/comments/children_comments.js | 64 +++-- src/forge/comments/comments.js | 342 ++++++++++++------------ 5 files changed, 315 insertions(+), 301 deletions(-) diff --git a/src/forge/Order/Detail.js b/src/forge/Order/Detail.js index c0fd1e45..8bd8de67 100644 --- a/src/forge/Order/Detail.js +++ b/src/forge/Order/Detail.js @@ -204,100 +204,103 @@ class Detail extends Component { return (
-
-
- - - -
-
- - - 【 - {data && data.issue_classify === "issue" - ? data.tracker +
+
+
+ + + +
+
+ + + 【 + {data && data.issue_classify === "issue" ? data.tracker - : "缺陷" - : "合并请求"} - 】 + ? data.tracker + : "缺陷" + : "合并请求"} + 】 + + {data && data.subject} - {data && data.subject} - - {data && data.priority && ( - {data.priority} - )} -
-
- - - {data && data.author_name} - - - 添加于 {data && data.created_at} - - {data && data.user_permission ? ( - - - 复制 - - this.deletedetail(orderId)} - > - - 删除 + {data && data.priority && ( + {data.priority} + )} +
+
+ + + {data && data.author_name} + + + 添加于 {data && data.created_at} + + {data && data.user_permission ? ( + + + 复制 - + this.deletedetail(orderId)} + > + + 删除 + + - - 编辑 - - - ) : ( - "" - )} + + 编辑 + + + ) : ( + "" + )} +
-
-
-
- {data && data.description && data.description.length > 0 ? ( - this.commentCtx(data.description) +
+
+ {data && data.description && data.description.length > 0 ? ( + this.commentCtx(data.description) + ) : ( + 没有描述 + )} +
+ {data && data.attachments && data.attachments.length > 0 ? ( + ) : ( - 没有描述 + "" )}
- {data && data.attachments && data.attachments.length > 0 ? ( - - ) : ( - "" - )}
+
-
+

分支: {data && data.branch_name ? data.branch_name : "--"} diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css index 9850f36a..44955488 100644 --- a/src/forge/Order/order.css +++ b/src/forge/Order/order.css @@ -568,7 +568,7 @@ a.issue-type-button.active:hover { } .item-list-right { width: 74%; - padding: 0px 15px 10px 0; + /* padding: 10px; */ } .detail_edit_action { padding: 10px; @@ -608,6 +608,12 @@ a.issue-type-button.active:hover { align-items: center; grid-template-columns: 1fr max-content; } +.grid-item-top { + display: grid; + align-items: center; + grid-template-columns: max-content 1fr; + align-items: flex-start; +} .fwb { font-weight: bold; } @@ -655,15 +661,27 @@ a.issue-type-button.active:hover { padding: 0 0 0 20px !important; } .comment-background { - background: rgba(250, 250, 250, 1); - /* padding: 15px; */ - border: 1px solid #f4f4f4; + background: #fff; + border-radius: 4px; + padding: 0 15px 15px; + /* border: 1px solid #f4f4f4; */ } .border-bottom-comment { border-bottom: 1px solid #eee; } -.comment-background .ant-list-header { - padding: 20px; + +.custom-comment-tabs .ant-tabs-top-bar{ + border-bottom: none; + padding: 15px 0; +} +.custom-comment-tabs .search-count-button{ + line-height: 18px; + margin-left: 8px; + background-color: rgba(235,244,254,1); + color: #1890ff; + font-size: 12px; + padding: 2px 8px; + border-radius: 9px; } .comment-background .ant-list-item { padding: 16px; @@ -684,8 +702,7 @@ a.issue-type-button.active:hover { box-shadow: none; } .children-comment-bg { - background: rgba(241, 248, 255, 1); - border: 1px solid rgba(238, 238, 238, 1); + background:rgba(250,250,250,1); } .display-in{ @@ -706,4 +723,6 @@ a.issue-type-button.active:hover { border-radius: 4px; margin-right: 5px; vertical-align: middle; -} \ No newline at end of file +} +.boder-4{border-radius: 4px;} +.pbt20{padding: 20px 0;} \ No newline at end of file diff --git a/src/forge/Upload/attachment.js b/src/forge/Upload/attachment.js index 812156f3..664fa15c 100644 --- a/src/forge/Upload/attachment.js +++ b/src/forge/Upload/attachment.js @@ -47,7 +47,7 @@ class Attachment extends Component{

{ attachments ? -
+
{ attachments.map((item,key)=>{ return( diff --git a/src/forge/comments/children_comments.js b/src/forge/comments/children_comments.js index 5d5e3d80..0157942d 100644 --- a/src/forge/comments/children_comments.js +++ b/src/forge/comments/children_comments.js @@ -121,7 +121,7 @@ class children_comments extends Component { const renderList = (item) => { return (
-
+
- - - - {item && item.user_name} - - {item.created_at} - - - - {current_user && - (current_user.admin || - current_user.login === item.user_login) ? ( - this.deleteorder(item.id)} - > - - - ) : ( - "" - )} - - + + {item && item.user_name} +
{this.commentCtx(item.content)} @@ -180,6 +155,29 @@ class children_comments extends Component { ) : ( "" )} +
+ {item.created_at} + + {current_user && + (current_user.admin || + current_user.login === item.user_login) ? ( + this.deleteorder(item.id)} + > + + + ) : ( + "" + )} + +
); @@ -188,7 +186,7 @@ class children_comments extends Component { return (
{search_count > 0 && ( -
+
); + // const comment_meditor = ( + + // ) + const new_comment = (is_reply, item_id) => { return ( -
- {(current_user && current_user.login) ? ( -
-
- - - - - {current_user && current_user.real_name} - -
- -

- {quillFlag && 请输入评论内容} -

- - } - size={100} - showNotification={this.props.showNotification} - /> -

- {is_reply && ( - - )} - -

-
- ) : ( -
- - - - {/* this.loginModal()}> - 登录 - 并参与到对话中 */} -
- )} +
+ + + +
+ +

+ {quillFlag && 请输入评论内容} +

+ + } + size={100} + showNotification={this.props.showNotification} + /> +

+ + +

+
); }; @@ -403,7 +375,7 @@ class comments extends Component { const renderList = (item) => { return (
-
+
- - - - {item && item.user_name} - - {item.created_at} - - - - {current_user && - (current_user.admin || - current_user.login === item.user_login) ? ( - this.deleteorder(item.id)} - > - - - ) : ( - "" - )} - - + + {item && item.user_name} +
{item.content ? ( @@ -466,6 +413,46 @@ class comments extends Component { ) : ( "" )} +
+ {item.created_at} + + {current_user && + (current_user.admin || + current_user.login === item.user_login) ? ( + this.deleteorder(item.id)} + > + + + ) : ( + "" + )} + + +
+ {current_user && ( +
+ {is_reply && reply_id && reply_id === item.id ? ( +
{new_comment(is_reply, item.id)}
+ ) : ( + "" + )} +
+ )}
- - {current_user && ( -
- {is_reply && reply_id && reply_id === item.id ? ( -
{new_comment(is_reply, item.id)}
- ) : ( -
- - - - - - -
- )} -
- )}
); }; return ( -
-
- {journalsdata && journalsdata.journals_total_count > 0 ? ( - 回复({journalsdata.journals_total_count})
} - dataSource={journalsdata.issue_journals} - renderItem={(item) => {renderList(item)}} - /> - ) : ( -
-
回复({search_count})
-
- )} +
+
+ + + 评论 + {search_count > 0 && ( + {search_count} + )} + + } + key="1" + > +
+ {is_reply && !reply_id ? ( +
{new_comment(is_reply, undefined)}
+ ) : ( +
+ + + + +
+ )} +
+ {journalsdata && journalsdata.journals_total_count > 0 && ( + ( + {renderList(item)} + )} + /> + )} +
+
{Paginations} -
{new_comment()}
); From 7f30b665e44dbf5ed469bca9f045e56771211238 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Tue, 9 Jun 2020 14:16:40 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/comments/comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forge/comments/comments.js b/src/forge/comments/comments.js index a783db55..ac307bc6 100644 --- a/src/forge/comments/comments.js +++ b/src/forge/comments/comments.js @@ -500,7 +500,7 @@ class comments extends Component { />