fix: réinitialiser le bouton de téléchargement après 5 secondes

Le bouton revient à son état initial après l'icône verte de
confirmation, permettant de relancer un téléchargement si besoin.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 13:49:18 +01:00
parent 2a4e2decde
commit ac6358437a

View File

@@ -69,6 +69,7 @@ export function QbittorrentDownloadButton({
} else if (data.success) {
setSent(true);
onDownloadStarted?.();
setTimeout(() => setSent(false), 5000);
} else {
setError(data.message || t("prowlarr.sentError"));
}
@@ -83,7 +84,7 @@ export function QbittorrentDownloadButton({
<button
type="button"
onClick={handleSend}
disabled={sending || sent}
disabled={sending}
className={`inline-flex items-center justify-center w-7 h-7 rounded-md transition-colors disabled:opacity-50 shrink-0 ${
sent
? "text-green-500"