Merge pull request #442 from answerdev/feat/1.1.1/ui

Feat/1.1.1/UI
This commit is contained in:
haitao.jarvis 2023-07-24 11:09:11 +08:00 committed by GitHub
commit 9443d0f48b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -134,7 +134,7 @@ const Index: FC<Props> = ({
path={handleParams(1)} path={handleParams(1)}
/> />
<Pagination.Ellipsis disabled /> <Pagination.Ellipsis className="pe-none" />
</> </>
)} )}
{currentPage >= 5 && ( {currentPage >= 5 && (
@ -182,7 +182,7 @@ const Index: FC<Props> = ({
); );
})} })}
{totalPage > 5 && realPage + 2 < totalPage && ( {totalPage > 5 && realPage + 2 < totalPage && (
<Pagination.Ellipsis disabled /> <Pagination.Ellipsis className="pe-none" />
)} )}
{totalPage > 0 && currentPage < totalPage && ( {totalPage > 0 && currentPage < totalPage && (

View File

@ -18,6 +18,7 @@ const Index: FC<Props> = ({ data, type }) => {
className="mb-2" className="mb-2"
key={type === 'answer' ? item.answer_id : item.question_id}> key={type === 'answer' ? item.answer_id : item.question_id}>
<a <a
className="me-3"
href={ href={
type === 'answer' type === 'answer'
? pathFactory.answerLanding({ ? pathFactory.answerLanding({
@ -33,7 +34,7 @@ const Index: FC<Props> = ({ data, type }) => {
{type === 'answer' ? item.question_info.title : item.title} {type === 'answer' ? item.question_info.title : item.title}
</a> </a>
<div className="d-inline-block text-secondary ms-3 small"> <div className="d-inline-block text-secondary me-3 small">
<Icon name="hand-thumbs-up-fill me-1" /> <Icon name="hand-thumbs-up-fill me-1" />
<span> <span>
{item.vote_count} {t('votes', { keyPrefix: 'counts' })} {item.vote_count} {t('votes', { keyPrefix: 'counts' })}
@ -41,7 +42,7 @@ const Index: FC<Props> = ({ data, type }) => {
</div> </div>
{type === 'question' && ( {type === 'question' && (
<div <div
className={`d-inline-block text-secondary ms-3 small ${ className={`d-inline-block text-secondary me-3 small ${
Number(item.accepted_answer_id) > 0 ? 'text-success' : '' Number(item.accepted_answer_id) > 0 ? 'text-success' : ''
}`}> }`}>
{Number(item.accepted_answer_id) > 0 ? ( {Number(item.accepted_answer_id) > 0 ? (
@ -58,7 +59,7 @@ const Index: FC<Props> = ({ data, type }) => {
)} )}
{type === 'answer' && item.accepted === 2 && ( {type === 'answer' && item.accepted === 2 && (
<div className="d-inline-block text-success ms-3 small"> <div className="d-inline-block text-success me-3 small">
<Icon name="check-circle-fill" /> <Icon name="check-circle-fill" />
<span> {t('accepted')}</span> <span> {t('accepted')}</span>
</div> </div>