mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-18 22:30:40 -07:00
Implement active task management for downloads and generations, enhancing user experience with toast notifications for ongoing tasks. Refactor language handling in forms to support multiple languages. Update audio player to manage restart functionality and improve sidebar icon representation. Adjust progress tracking for model downloads in the backend.
This commit is contained in:
@@ -54,10 +54,10 @@ export function ModelManagement() {
|
||||
return apiClient.triggerModelDownload(modelName);
|
||||
},
|
||||
onSuccess: () => {
|
||||
// Refetch status after a delay to see progress
|
||||
setTimeout(() => {
|
||||
queryClient.invalidateQueries({ queryKey: ['modelStatus'] });
|
||||
}, 1000);
|
||||
// Download completed - clear state and refetch status
|
||||
setDownloadingModel(null);
|
||||
setDownloadingDisplayName(null);
|
||||
queryClient.invalidateQueries({ queryKey: ['modelStatus'] });
|
||||
},
|
||||
onError: (error: Error) => {
|
||||
setDownloadingModel(null);
|
||||
@@ -68,13 +68,6 @@ export function ModelManagement() {
|
||||
variant: 'destructive',
|
||||
});
|
||||
},
|
||||
onSettled: () => {
|
||||
// Clear downloading state after a delay to allow progress to show
|
||||
setTimeout(() => {
|
||||
setDownloadingModel(null);
|
||||
setDownloadingDisplayName(null);
|
||||
}, 2000);
|
||||
},
|
||||
});
|
||||
|
||||
const deleteMutation = useMutation({
|
||||
|
||||
Reference in New Issue
Block a user