Commit a0907674 authored by StyleZhang's avatar StyleZhang

fix: header-nav

parent 9da3cc6c
......@@ -82,7 +82,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
const router = useRouter()
const { dataset } = useDatasetDetailContext()
const [notionPageSelectorModalVisible, setNotionPageSelectorModalVisible] = useState(false)
const [timerCanRun, setTimerCanRun] = useState(false)
const [timerCanRun, setTimerCanRun] = useState(true)
const query = useMemo(() => {
return { page: currPage + 1, limit, keyword: searchValue }
......@@ -100,7 +100,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
const progressPercentMap = datasetIndexingStatus?.data.reduce((prev: Record<string, number>, next: IndexingStatusResponse) => {
const { id, completed_segments, total_segments, indexing_status } = next
if (indexing_status === 'completed')
if (indexing_status === 'completed' || indexing_status === 'paused' || indexing_status === 'error')
completedNum++
const completedCount = completed_segments || 0
const totalCount = total_segments || 0
......
......@@ -24,7 +24,7 @@ export type INavSelectorProps = {
const itemClassName = `
flex items-center w-full h-10 px-3 text-gray-700 text-[14px]
rounded-lg font-normal hover:bg-gray-100 cursor-pointer
rounded-lg font-normal hover:bg-gray-100 cursor-pointer truncate
`
const NavSelector = ({ curNav, navs, createText, onCreate, onLoadmore }: INavSelectorProps) => {
......@@ -50,9 +50,9 @@ const NavSelector = ({ curNav, navs, createText, onCreate, onLoadmore }: INavSel
text-[#1C64F2] hover:bg-[#EBF5FF]
"
>
{curNav?.name}
<div className='max-w-[180px] truncate' title={curNav?.name}>{curNav?.name}</div>
<ChevronDownIcon
className="w-3 h-3 ml-1"
className="shrink-0 w-3 h-3 ml-1"
aria-hidden="true"
/>
</Menu.Button>
......@@ -68,7 +68,7 @@ const NavSelector = ({ curNav, navs, createText, onCreate, onLoadmore }: INavSel
{
navs.map(nav => (
<Menu.Item key={nav.id}>
<div className={itemClassName} onClick={() => router.push(nav.link)}>
<div className={itemClassName} onClick={() => router.push(nav.link)} title={nav.name}>
<div className='relative w-6 h-6 mr-2 bg-[#D5F5F6] rounded-[6px]'>
<AppIcon size='tiny' icon={nav.icon} background={nav.icon_background}/>
<div className='flex justify-center items-center absolute -right-0.5 -bottom-0.5 w-2.5 h-2.5 bg-white rounded'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment