feat(actions): rtorrent add folder rename toggle (#756)

* feat(actions): rtorrent add folder rename toggle

* refactor: use content layout
This commit is contained in:
metonym 2023-03-19 13:25:53 -07:00 committed by GitHub
parent 4449df66aa
commit 9fed6b3735
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 9 deletions

View file

@ -1,6 +1,6 @@
import { AlertWarning } from "../../components/alerts";
import { DownloadClientSelect, NumberField, Select, SwitchGroup, TextField } from "../../components/inputs";
import { ActionContentLayoutOptions, ActionTypeNameMap, ActionTypeOptions } from "../../domain/constants";
import { ActionContentLayoutOptions, ActionRtorrentRenameOptions, ActionTypeNameMap, ActionTypeOptions } from "../../domain/constants";
import React, { Fragment, useRef } from "react";
import { useQuery } from "react-query";
import { APIClient } from "../../api/APIClient";
@ -359,6 +359,16 @@ const TypeForm = ({ action, idx, clients }: TypeFormProps) => {
placeholder="eg. /full/path/to/download_folder"
/>
</div>
<div className="col-span-12 sm:col-span-6">
<div className="col-span-6">
<Select
name={`actions.${idx}.content_layout`}
label="Don't add torrent's name to path"
optionDefaultText="No"
options={ActionRtorrentRenameOptions}
/>
</div>
</div>
</div>
</div>
);