fix: installing info in plugin nav

This commit is contained in:
zxhlyh
2025-01-07 14:00:04 +08:00
parent ff61c22f36
commit 851fe246a7
4 changed files with 101 additions and 9 deletions

View File

@ -64,14 +64,16 @@ export const usePluginTaskStatus = () => {
const timerRef = useRef<NodeJS.Timeout | null>(null)
useEffect(() => {
if (isSuccess && opacity > 0) {
if (isSuccess) {
if (timerRef.current) {
clearTimeout(timerRef.current)
timerRef.current = null
}
timerRef.current = setTimeout(() => {
setOpacity(v => v - 0.1)
}, 200)
if (opacity > 0) {
timerRef.current = setTimeout(() => {
setOpacity(v => v - 0.1)
}, 200)
}
}
if (!isSuccess)