Add indexingNotLoaded state

This commit is contained in:
Justin Milner 2024-05-03 11:41:09 -04:00
parent aadd3694ce
commit 9f37792c8f
2 changed files with 14 additions and 3 deletions

View file

@ -191,7 +191,7 @@ const Layout = () => {
}
}, [location]);
const [indexingProgress, setIndexingProgress] = useState(1);
const [indexingProgress, setIndexingProgress] = useState(-1);
const [indexingTask, setIndexingTask] = useState("Indexing Codebase");
const [indexingFailed, setIndexingFailed] = useState(false);

View file

@ -88,7 +88,18 @@ const IndexingProgressBar = ({
className="cursor-pointer"
>
{
indexingFailed ? ( //red 'failed' dot
completed < 0 ? ( //
<>
<CircleDiv data-tooltip-id="indexingNotLoaded_dot" color="#72aec2"></CircleDiv>
{tooltipPortalDiv &&
ReactDOM.createPortal(
<StyledTooltip id="indexingNotLoaded_dot" place="top">
Codebase indexing is starting up.
</StyledTooltip>,
tooltipPortalDiv,
)}
</>
) : indexingFailed ? ( //red 'failed' dot
<>
<CircleDiv data-tooltip-id="indexingFailed_dot" color="#ff0000"></CircleDiv>
{tooltipPortalDiv &&
@ -99,7 +110,7 @@ const IndexingProgressBar = ({
tooltipPortalDiv,
)}
</>
) : completed >= total ? ( //indexing complete green dot
) : completed >= total ? ( //indexing complete green dot
<>
<CircleDiv data-tooltip-id="progress_dot" color="#090"></CircleDiv>
{tooltipPortalDiv &&