From f685edf51073ac3be50ff00073a2432b4113bf82 Mon Sep 17 00:00:00 2001 From: 赵智超 <1012112796@qq.com> Date: Fri, 3 Apr 2020 13:12:42 +0800 Subject: Change review status icons on PR view style to Github style (#10737) * change the icon of ApproveReview pr from "eye" to "check" like github * change the icon of RejectReview pr from "x" to "request-change" like github * add "-" after "{{" which need to be one line (TODO: may be not change all) Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao Co-authored-by: John Olheiser Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> --- models/review.go | 6 +++--- models/review_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'models') diff --git a/models/review.go b/models/review.go index ec28b41d35..993b5577bd 100644 --- a/models/review.go +++ b/models/review.go @@ -33,10 +33,10 @@ const ( func (rt ReviewType) Icon() string { switch rt { case ReviewTypeApprove: - return "eye" + return "check" case ReviewTypeReject: - return "x" - case ReviewTypeComment, ReviewTypeUnknown: + return "request-changes" + case ReviewTypeComment: return "comment" default: return "comment" diff --git a/models/review_test.go b/models/review_test.go index a94a65f754..4425012408 100644 --- a/models/review_test.go +++ b/models/review_test.go @@ -44,8 +44,8 @@ func TestReview_LoadCodeComments(t *testing.T) { } func TestReviewType_Icon(t *testing.T) { - assert.Equal(t, "eye", ReviewTypeApprove.Icon()) - assert.Equal(t, "x", ReviewTypeReject.Icon()) + assert.Equal(t, "check", ReviewTypeApprove.Icon()) + assert.Equal(t, "request-changes", ReviewTypeReject.Icon()) assert.Equal(t, "comment", ReviewTypeComment.Icon()) assert.Equal(t, "comment", ReviewTypeUnknown.Icon()) assert.Equal(t, "comment", ReviewType(4).Icon()) -- cgit v1.2.3