mirror of https://gitee.com/answerdev/answer.git
feat(question): add a [closed] tip in closed question title
This commit is contained in:
parent
bf85f586d8
commit
fb176e9a99
|
@ -144,6 +144,7 @@ const QuestionList: FC<Props> = ({ source }) => {
|
||||||
<h5 className="text-wrap text-break">
|
<h5 className="text-wrap text-break">
|
||||||
<NavLink to={`/questions/${li.id}`} className="text-body">
|
<NavLink to={`/questions/${li.id}`} className="text-body">
|
||||||
{li.title}
|
{li.title}
|
||||||
|
{li.status === 2 ? ` [${t('closed')}]` : ''}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</h5>
|
</h5>
|
||||||
<div className="d-flex align-items-center fs-14 text-secondary">
|
<div className="d-flex align-items-center fs-14 text-secondary">
|
||||||
|
|
|
@ -685,6 +685,7 @@
|
||||||
"modified": "modified",
|
"modified": "modified",
|
||||||
"answered": "answered",
|
"answered": "answered",
|
||||||
"asked": "asked",
|
"asked": "asked",
|
||||||
|
"closed": "closed",
|
||||||
"follow_a_tag": "Follow a tag"
|
"follow_a_tag": "Follow a tag"
|
||||||
},
|
},
|
||||||
"personal": {
|
"personal": {
|
||||||
|
|
|
@ -50,6 +50,9 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer }) => {
|
||||||
<h1 className="fs-3 mb-3 text-wrap text-break">
|
<h1 className="fs-3 mb-3 text-wrap text-break">
|
||||||
<Link className="text-body" reloadDocument to={`/questions/${data.id}`}>
|
<Link className="text-body" reloadDocument to={`/questions/${data.id}`}>
|
||||||
{data.title}
|
{data.title}
|
||||||
|
{data.status === 2
|
||||||
|
? ` [${t('closed', { keyPrefix: 'question' })}]`
|
||||||
|
: ''}
|
||||||
</Link>
|
</Link>
|
||||||
</h1>
|
</h1>
|
||||||
<div className="d-flex align-items-center fs-14 mb-3 text-secondary">
|
<div className="d-flex align-items-center fs-14 mb-3 text-secondary">
|
||||||
|
|
Loading…
Reference in New Issue