Add indexingNotLoaded state
This commit is contained in:
parent
aadd3694ce
commit
9f37792c8f
2 changed files with 14 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue