From a30b61f12c65b62715846d1b5d6616fa8342d49c Mon Sep 17 00:00:00 2001 From: mydearxym Date: Wed, 1 Dec 2021 10:34:10 +0800 Subject: [PATCH 1/4] chore(report): adjust hide logic & text --- src/containers/tool/AbuseReport/Header.tsx | 6 ++++-- .../tool/AbuseReport/ReportContent/Main.tsx | 2 +- src/containers/tool/AbuseReport/defaults/article.ts | 2 +- src/containers/tool/AbuseReport/index.tsx | 9 +++++++-- src/containers/tool/AbuseReport/logic.ts | 3 ++- src/containers/tool/AbuseReport/store.ts | 13 +++++++++++-- src/containers/tool/AbuseReport/styles/header.ts | 1 + src/containers/unit/ArticleFooter/Actions/index.tsx | 2 +- 8 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/containers/tool/AbuseReport/Header.tsx b/src/containers/tool/AbuseReport/Header.tsx index 6710410d2..cd8eb8e21 100644 --- a/src/containers/tool/AbuseReport/Header.tsx +++ b/src/containers/tool/AbuseReport/Header.tsx @@ -1,5 +1,6 @@ import { FC, memo } from 'react' +import type { TArticle } from '@/spec' import { REPORT_TYPE } from '@/constant' import { ICON } from '@/config' @@ -27,9 +28,10 @@ type TProps = { type: string view: 'main' | 'detail' activeItem: TREPORT_ITEM + article: TArticle } -const Header: FC = ({ type, view, activeItem }) => { +const Header: FC = ({ type, view, activeItem, article }) => { return ( @@ -38,7 +40,7 @@ const Header: FC = ({ type, view, activeItem }) => { ) : ( 举报{getCustomTitle(type)} )} - 这是一首简单的小情歌 + {article.title} ) } diff --git a/src/containers/tool/AbuseReport/ReportContent/Main.tsx b/src/containers/tool/AbuseReport/ReportContent/Main.tsx index 6a85cca5d..a1bb2b432 100644 --- a/src/containers/tool/AbuseReport/ReportContent/Main.tsx +++ b/src/containers/tool/AbuseReport/ReportContent/Main.tsx @@ -35,7 +35,7 @@ const Main: FC = ({ items, activeItem }) => { ))} - 感谢你用实际行动为社区净化作出贡献。 + 感谢你为社区净化作出贡献,我们将尽快处理。 ) } diff --git a/src/containers/tool/AbuseReport/defaults/article.ts b/src/containers/tool/AbuseReport/defaults/article.ts index 521156f3a..0fe24d46f 100644 --- a/src/containers/tool/AbuseReport/defaults/article.ts +++ b/src/containers/tool/AbuseReport/defaults/article.ts @@ -28,7 +28,7 @@ const items = [ '包括但不限于盗版话题讨论,未授权转载,人身攻击,无根据造谣等内容。', }, { - title: '坏问题', + title: '劣质问题', raw: REPORT.ARTICLE.BAD_QUESTION, checked: false, detail: diff --git a/src/containers/tool/AbuseReport/index.tsx b/src/containers/tool/AbuseReport/index.tsx index 49f830edf..1797bf6f7 100755 --- a/src/containers/tool/AbuseReport/index.tsx +++ b/src/containers/tool/AbuseReport/index.tsx @@ -33,12 +33,17 @@ const AbuseReportContainer: FC = ({ testid = 'abuse-report', }) => { useInit(store) - const { show, type, view, itemsData, activeItem } = store + const { show, type, view, itemsData, activeItem, viewingArticle } = store return ( close()}> -
+