feat(question): add a [closed] tip in closed question title

This commit is contained in:
haitao(lj) 2022-09-30 10:00:47 +08:00
parent bf85f586d8
commit fb176e9a99
3 changed files with 5 additions and 0 deletions

View File

@ -144,6 +144,7 @@ const QuestionList: FC<Props> = ({ source }) => {
<h5 className="text-wrap text-break">
<NavLink to={`/questions/${li.id}`} className="text-body">
{li.title}
{li.status === 2 ? ` [${t('closed')}]` : ''}
</NavLink>
</h5>
<div className="d-flex align-items-center fs-14 text-secondary">

View File

@ -685,6 +685,7 @@
"modified": "modified",
"answered": "answered",
"asked": "asked",
"closed": "closed",
"follow_a_tag": "Follow a tag"
},
"personal": {

View File

@ -50,6 +50,9 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer }) => {
<h1 className="fs-3 mb-3 text-wrap text-break">
<Link className="text-body" reloadDocument to={`/questions/${data.id}`}>
{data.title}
{data.status === 2
? ` [${t('closed', { keyPrefix: 'question' })}]`
: ''}
</Link>
</h1>
<div className="d-flex align-items-center fs-14 mb-3 text-secondary">