A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
Feat/1.3.0/UI (#848)
dashuaia309f9f897e3
diff --git a/i18n/en_US.yaml b/i18n/en_US.yamlindex debe3dbc..7bbbe748 100644--- a/i18n/en_US.yaml+++ b/i18n/en_US.yaml@@ -1071,6 +1071,7 @@ ui:asked: askedupdate: Modifiededit: edited+ commented: commentedViews: ViewedFollow: FollowFollowing: Followingdiff --git a/ui/src/pages/Admin/Answers/index.tsx b/ui/src/pages/Admin/Answers/index.tsxindex a653f7f5..091fe2db 100644--- a/ui/src/pages/Admin/Answers/index.tsx+++ b/ui/src/pages/Admin/Answers/index.tsx@@ -110,32 +110,28 @@ const Answers: FC = () => {return (<tr key={li.id}><td>- <Stack>- <Stack direction="horizontal" gap={2}>- <a- href={pathFactory.answerLanding({- questionId: li.question_id,- slugTitle: li.question_info.url_title,- answerId: li.id,- })}- target="_blank"- className="text-break text-wrap"- rel="noreferrer">- {li.question_info.title}- {li.accepted === 2 && (- <Icon- name="check-circle-fill"- className="ms-2 text-success"- />- )}- </a>- </Stack>- <div- className="text-truncate-2 small"- style={{ maxWidth: '30rem' }}>- {escapeRemove(li.description)}- </div>- </Stack>+ <a+ href={pathFactory.answerLanding({+ questionId: li.question_id,+ slugTitle: li.question_info.url_title,+ answerId: li.id,+ })}+ target="_blank"+ className="text-break text-wrap"+ rel="noreferrer">+ {li.question_info.title}+ </a>+ {li.accepted === 2 && (+ <Icon+ name="check-circle-fill"+ className="ms-2 text-success"+ />+ )}+ <div+ className="text-truncate-2 small"+ style={{ maxWidth: '30rem' }}>+ {escapeRemove(li.description)}+ </div></td><td>{li.vote_count}</td><td>diff --git a/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx b/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsxindex 2f79305b..96b2b0ac 100644--- a/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx+++ b/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx@@ -46,17 +46,24 @@ const SearchQuestion = ({ similarQuestions }) => {<ListGroup.Itemactionas="a"- className="link-dark text-wrap text-break grid gap-0 row-gap-3"+ className="link-dark text-wrap text-break"key={item.id}href={pathFactory.questionLanding(item.id, item.url_title)}target="_blank">- {item.title}- {item.status === 'closed'- ? ` [${t('closed', { keyPrefix: 'question' })}]`- : null}+ <span+ className={`${+ item.accepted_answer || item.answer_count > 0+ ? 'me-3'+ : ''+ }`}>+ {item.title}+ {item.status === 'closed'+ ? ` [${t('closed', { keyPrefix: 'question' })}] `+ : null}+ </span>{item.accepted_answer ? (- <span className="small ms-3 text-success d-inline-block">+ <span className="small text-success d-inline-block"><Icon type="bi" name="check-circle-fill" /><span className="ms-1">{t('x_answers', {@@ -67,7 +74,7 @@ const SearchQuestion = ({ similarQuestions }) => {</span>) : (item.answer_count > 0 && (- <span className="small ms-3 text-secondary d-inline-block">+ <span className="small text-secondary d-inline-block"><Icon type="bi" name="chat-square-text-fill" /><span className="ms-1">{t('x_answers', {