mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-07 09:53:17 +00:00
fix: resolve queue management and metadata fetch bugs
- Reset isRemoving state in DeleteConfirmationModal on open and close to prevent UI freeze - Filter sidebar queue count to exclude completed downloads - Return fully resolved URL from backend metadata fetch to avoid 403s on one-time tokens
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useDownloadStore } from '../store/useDownloadStore';
|
||||
import { AlertTriangle } from 'lucide-react';
|
||||
|
||||
@@ -7,6 +7,13 @@ export const DeleteConfirmationModal: React.FC = () => {
|
||||
const [errorMessage, setErrorMessage] = useState('');
|
||||
const [isRemoving, setIsRemoving] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (deleteModalState.isOpen) {
|
||||
setIsRemoving(false);
|
||||
setErrorMessage('');
|
||||
}
|
||||
}, [deleteModalState.isOpen]);
|
||||
|
||||
if (!deleteModalState.isOpen) return null;
|
||||
|
||||
const handleCancel = () => {
|
||||
@@ -38,6 +45,7 @@ export const DeleteConfirmationModal: React.FC = () => {
|
||||
setIsRemoving(false);
|
||||
return;
|
||||
}
|
||||
setIsRemoving(false);
|
||||
closeDeleteModal();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user