From 25cf543b07433ecf1d9858d8b4b77019802a3aa0 Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Sat, 3 Feb 2024 10:46:42 +0300 Subject: [PATCH] web: disable multiple .torrent file selection in Add new torrent file selection dialog (#347) --- web/src/components/Add/LeftSideComponent.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/Add/LeftSideComponent.jsx b/web/src/components/Add/LeftSideComponent.jsx index 7bb785a..8f4289c 100644 --- a/web/src/components/Add/LeftSideComponent.jsx +++ b/web/src/components/Add/LeftSideComponent.jsx @@ -39,7 +39,11 @@ export default function LeftSideComponent({ } const [isTorrentSourceActive, setIsTorrentSourceActive] = useState(false) - const { getRootProps, getInputProps, isDragActive } = useDropzone({ onDrop: handleCapture, accept: '.torrent' }) + const { getRootProps, getInputProps, isDragActive } = useDropzone({ + onDrop: handleCapture, + accept: '.torrent', + multiple: false, + }) const handleTorrentSourceChange = ({ target: { value } }) => setTorrentSource(value)