mirror of https://gitee.com/answerdev/answer.git
fix: question detail closed reason
This commit is contained in:
parent
3c6880da90
commit
152e819a2b
|
@ -187,6 +187,11 @@ const useReportModal = (callback?: () => void) => {
|
||||||
}
|
}
|
||||||
value={content.value}
|
value={content.value}
|
||||||
isInvalid={content.isInvalid}
|
isInvalid={content.isInvalid}
|
||||||
|
placeholder={
|
||||||
|
item.content_type === 'text'
|
||||||
|
? t('input_placeholder')
|
||||||
|
: t('textarea_placeholder')
|
||||||
|
}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setContent({
|
setContent({
|
||||||
value: e.target.value,
|
value: e.target.value,
|
||||||
|
|
|
@ -199,7 +199,9 @@
|
||||||
},
|
},
|
||||||
"msg": {
|
"msg": {
|
||||||
"empty": "Please select a reason."
|
"empty": "Please select a reason."
|
||||||
}
|
},
|
||||||
|
"input_placeholder": "Enter the existing question link",
|
||||||
|
"textarea_placeholder": "Let us know specifically what you are concerned about"
|
||||||
},
|
},
|
||||||
"tag_modal": {
|
"tag_modal": {
|
||||||
"title": "Create New Tag",
|
"title": "Create New Tag",
|
||||||
|
@ -590,6 +592,8 @@
|
||||||
"edit": "edit",
|
"edit": "edit",
|
||||||
"Views": "Views",
|
"Views": "Views",
|
||||||
"answered": "answered",
|
"answered": "answered",
|
||||||
|
"closed_in": "Closed in",
|
||||||
|
"show_exist": "Show existing question.",
|
||||||
"answers": {
|
"answers": {
|
||||||
"title": "Answers",
|
"title": "Answers",
|
||||||
"score": "Score",
|
"score": "Score",
|
||||||
|
@ -869,4 +873,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,44 @@
|
||||||
import { memo, FC } from 'react';
|
import { memo, FC } from 'react';
|
||||||
import { Alert } from 'react-bootstrap';
|
import { Alert } from 'react-bootstrap';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
data;
|
data;
|
||||||
}
|
}
|
||||||
const Index: FC<Props> = ({ data }) => {
|
const Index: FC<Props> = ({ data }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Alert className="mb-4" variant="info">
|
<Alert className="mb-4" variant="info">
|
||||||
<div>
|
<div>
|
||||||
<strong>{data.operation_msg} </strong>
|
{data.operation_msg.indexOf('http') > -1 ? (
|
||||||
{data.operation_description}
|
<p>
|
||||||
|
{data.operation_description}
|
||||||
|
<a href={data.operation_msg} style={{ color: '#055160' }}>
|
||||||
|
<strong>{t('question_detail.show_exist')}</strong>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p>
|
||||||
|
{data.operation_msg
|
||||||
|
? data.operation_msg
|
||||||
|
: data.operation_description}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
<div className="fs-14">
|
||||||
|
{t('question_detail.closed_in')}{' '}
|
||||||
|
<time
|
||||||
|
dateTime={dayjs.unix(data.operation_time).toISOString()}
|
||||||
|
title={dayjs
|
||||||
|
.unix(data.operation_time)
|
||||||
|
.format(t('dates.long_date_with_time'))}>
|
||||||
|
{dayjs
|
||||||
|
.unix(data.operation_time)
|
||||||
|
.format(t('dates.long_date_with_year'))}
|
||||||
|
</time>
|
||||||
|
.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Alert>
|
</Alert>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue