diff --git a/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx b/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx index 9c7e2dfb..df47c4ed 100644 --- a/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx +++ b/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx @@ -15,6 +15,7 @@ interface FilesystemBrowserTextboxProps { suggested?: string; showBasePathToggle?: boolean; showCompletedToggle?: boolean; + showSequentialToggle?: boolean; onChange?: (destination: string) => void; } @@ -27,6 +28,7 @@ const FilesystemBrowserTextbox = forwardRef, ); } + if (showSequentialToggle) { + // TODO: this is getting bloated. toggles can be moved to their own elements... + toggles.push( + + + , + ); + } return ( @@ -156,6 +166,7 @@ FilesystemBrowserTextbox.defaultProps = { suggested: undefined, showBasePathToggle: false, showCompletedToggle: false, + showSequentialToggle: false, onChange: undefined, }; diff --git a/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByFile.tsx b/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByFile.tsx index 1588653a..ad916ec9 100644 --- a/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByFile.tsx +++ b/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByFile.tsx @@ -19,6 +19,7 @@ interface AddTorrentsByFileFormData { tags: string; isBasePath: boolean; isCompleted: boolean; + isSequential: boolean; } const AddTorrentsByFile: FC = () => { @@ -64,6 +65,7 @@ const AddTorrentsByFile: FC = () => { selectable="directories" showBasePathToggle showCompletedToggle + showSequentialToggle /> { @@ -74,7 +76,14 @@ const AddTorrentsByFile: FC = () => { const formData = formRef.current?.getFormData(); setIsAddingTorrents(true); - const {destination, start, tags, isBasePath, isCompleted} = formData as Partial; + const { + destination, + start, + tags, + isBasePath, + isCompleted, + isSequential, + } = formData as Partial; const filesData: Array = []; filesRef.current.forEach((file) => { @@ -94,6 +103,7 @@ const AddTorrentsByFile: FC = () => { tags: tagsArray, isBasePath, isCompleted, + isSequential, start, }).then(() => { UIStore.dismissModal(); diff --git a/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByURL.tsx b/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByURL.tsx index 070e6e88..d5e4a570 100644 --- a/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByURL.tsx +++ b/client/src/javascript/components/modals/add-torrents-modal/AddTorrentsByURL.tsx @@ -20,6 +20,7 @@ type AddTorrentsByURLFormData = { destination: string; isBasePath: boolean; isCompleted: boolean; + isSequential: boolean; start: boolean; tags: string; }; @@ -99,6 +100,7 @@ const AddTorrentsByURL: FC = () => { selectable="directories" showBasePathToggle showCompletedToggle + showSequentialToggle /> { @@ -134,6 +136,7 @@ const AddTorrentsByURL: FC = () => { destination: formData.destination, isBasePath: formData.isBasePath, isCompleted: formData.isCompleted, + isSequential: formData.isSequential, start: formData.start, tags, }).then(() => { diff --git a/client/src/javascript/i18n/strings.compiled.json b/client/src/javascript/i18n/strings.compiled.json index ad99e062..46ea2aaa 100644 --- a/client/src/javascript/i18n/strings.compiled.json +++ b/client/src/javascript/i18n/strings.compiled.json @@ -1859,6 +1859,12 @@ "value": "Completed" } ], + "torrents.destination.sequential": [ + { + "type": 0, + "value": "Sequential Download" + } + ], "torrents.details.actions.pause": [ { "type": 0, diff --git a/client/src/javascript/i18n/strings.json b/client/src/javascript/i18n/strings.json index 85d58497..00574a2a 100644 --- a/client/src/javascript/i18n/strings.json +++ b/client/src/javascript/i18n/strings.json @@ -265,6 +265,7 @@ "torrents.create.tags.input.placeholder": "Tags in Flood. Not added to created torrent.", "torrents.destination.base_path": "Use as Base Path", "torrents.destination.completed": "Completed", + "torrents.destination.sequential": "Sequential Download", "torrents.details.actions.pause": "Pause", "torrents.details.actions.start": "Start", "torrents.details.actions.stop": "Stop",