Skip to content

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.

fix(Search): Adjust the border color of the list-group-item to default

haitao(lj)714364aaed18
diff --git a/ui/src/pages/Search/components/Head/index.tsx b/ui/src/pages/Search/components/Head/index.tsx
index ec1d1dc4..35d3cead 100644
--- a/ui/src/pages/Search/components/Head/index.tsx
+++ b/ui/src/pages/Search/components/Head/index.tsx
@@ -37,7 +37,7 @@ const Index: FC<Props> = ({ data }) => {
<div className="mb-5">
<h3 className="mb-3">{t('title')}</h3>
<p>
- <span className="text-secondary">{t('keywords')}</span>
+ <span className="text-secondary me-1">{t('keywords')}</span>
{q?.replace(reg, '')}
<br />
{options?.length && (
diff --git a/ui/src/pages/Search/components/SearchHead/index.tsx b/ui/src/pages/Search/components/SearchHead/index.tsx
index fb185bc1..3dbada0f 100644
--- a/ui/src/pages/Search/components/SearchHead/index.tsx
+++ b/ui/src/pages/Search/components/SearchHead/index.tsx
@@ -1,5 +1,4 @@
import { FC, memo } from 'react';
-import { ListGroupItem } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
import { QueryGroup } from '@/components';
@@ -16,7 +15,7 @@ const Index: FC<Props> = ({ sort, count = 0 }) => {
});
return (
- <ListGroupItem className="d-flex flex-wrap align-items-center justify-content-between divide-line pb-3 border-bottom px-0">
+ <div className="d-flex flex-wrap align-items-center justify-content-between pt-2 pb-3">
<h5 className="mb-0">{t('counts', { count, keyPrefix: 'search' })}</h5>
<QueryGroup
data={sortBtns}
@@ -24,7 +23,7 @@ const Index: FC<Props> = ({ sort, count = 0 }) => {
sortKey="order"
i18nKeyPrefix="search.sort_btns"
/>
- </ListGroupItem>
+ </div>
);
};
diff --git a/ui/src/pages/Search/components/SearchItem/index.tsx b/ui/src/pages/Search/components/SearchItem/index.tsx
index 2bd8738a..f795c4ae 100644
--- a/ui/src/pages/Search/components/SearchItem/index.tsx
+++ b/ui/src/pages/Search/components/SearchItem/index.tsx
@@ -27,7 +27,7 @@ const Index: FC<Props> = ({ data }) => {
});
}
return (
- <ListGroupItem className="py-3 px-0">
+ <ListGroupItem className="py-3 px-0 border-start-0 border-end-0 bg-transparent">
<div className="mb-2 clearfix">
<span
className="float-start me-2 badge text-bg-dark"
diff --git a/ui/src/pages/Search/index.tsx b/ui/src/pages/Search/index.tsx
index 5efca86c..ed397b63 100644
--- a/ui/src/pages/Search/index.tsx
+++ b/ui/src/pages/Search/index.tsx
@@ -36,10 +36,8 @@ const Index = () => {
<Row className="justify-content-center">
<Col xxl={7} lg={8} sm={12} className="mb-3">
<Head data={extra} />
-
- <ListGroup variant="flush" className="mb-5">
- <SearchHead sort={order} count={count} />
-
+ <SearchHead sort={order} count={count} />
+ <ListGroup className="rounded-0 mb-5">
{list?.map((item) => {
return <SearchItem key={item.object.id} data={item} />;
})}