mirror of https://gitee.com/answerdev/answer.git
Merge pull request #481 from answerdev/feat/1.1.2/ui
fix: optimize the user name is too long
This commit is contained in:
commit
b3fde86131
|
@ -30,9 +30,10 @@ const Index: FC<Props> = ({
|
|||
const { t } = useTranslation('translation', { keyPrefix: 'counts' });
|
||||
|
||||
return (
|
||||
<div className={classname('d-flex align-items-center', className)}>
|
||||
<div
|
||||
className={classname('d-flex align-items-center flex-wrap', className)}>
|
||||
{showVotes && (
|
||||
<div className="d-flex align-items-center">
|
||||
<div className="d-flex align-items-center flex-shrink-0">
|
||||
<Icon name="hand-thumbs-up-fill me-1" />
|
||||
<span>
|
||||
{data.votes} {t('votes')}
|
||||
|
@ -41,7 +42,7 @@ const Index: FC<Props> = ({
|
|||
)}
|
||||
|
||||
{showAccepted && (
|
||||
<div className="d-flex align-items-center ms-3 text-success">
|
||||
<div className="d-flex align-items-center ms-3 text-success flex-shrink-0">
|
||||
<Icon name="check-circle-fill me-1" />
|
||||
<span>{t('accepted')}</span>
|
||||
</div>
|
||||
|
@ -49,7 +50,7 @@ const Index: FC<Props> = ({
|
|||
|
||||
{showAnswers && (
|
||||
<div
|
||||
className={`d-flex align-items-center ms-3 ${
|
||||
className={`d-flex align-items-center ms-3 flex-shrink-0 ${
|
||||
isAccepted ? 'text-success' : ''
|
||||
}`}>
|
||||
{isAccepted ? (
|
||||
|
@ -63,7 +64,7 @@ const Index: FC<Props> = ({
|
|||
</div>
|
||||
)}
|
||||
{showViews && (
|
||||
<span className="summary-stat ms-3">
|
||||
<span className="summary-stat ms-3 flex-shrink-0">
|
||||
<Icon name="eye-fill" />
|
||||
<em className="fst-normal ms-1">
|
||||
{data.views} {t('views')}
|
||||
|
|
|
@ -84,8 +84,10 @@ const QuestionList: FC<Props> = ({
|
|||
{li.status === 2 ? ` [${t('closed')}]` : ''}
|
||||
</NavLink>
|
||||
</h5>
|
||||
<div className="d-flex flex-column flex-md-row align-items-md-center small mb-2 text-secondary">
|
||||
<div className="d-flex">
|
||||
<div
|
||||
className="d-flex flex-column flex-md-row align-items-md-center small mb-2 text-secondary flex-wrap"
|
||||
style={{ gap: '0.5rem' }}>
|
||||
<div className="d-flex flex-shrink-0 me-0 me-md-3 flex-nowrap">
|
||||
<BaseUserCard
|
||||
data={li.operator}
|
||||
showAvatar={false}
|
||||
|
@ -105,7 +107,7 @@ const QuestionList: FC<Props> = ({
|
|||
views: li.view_count,
|
||||
}}
|
||||
isAccepted={li.accepted_answer_id >= 1}
|
||||
className="ms-0 ms-md-3 mt-2 mt-md-0"
|
||||
className="justify-content-start-end justify-content-md-end flex-fill"
|
||||
/>
|
||||
</div>
|
||||
<div className="question-tags m-n1">
|
||||
|
|
Loading…
Reference in New Issue