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