mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(actions): rtorrent add folder rename toggle (#756)
* feat(actions): rtorrent add folder rename toggle * refactor: use content layout
This commit is contained in:
parent
4449df66aa
commit
9fed6b3735
3 changed files with 38 additions and 9 deletions
|
@ -343,6 +343,11 @@ export const ActionContentLayoutOptions: SelectGenericOption<ActionContentLayout
|
|||
{ label: "Don't create subfolder", description: "Don't create subfolder", value: "SUBFOLDER_NONE" }
|
||||
];
|
||||
|
||||
export const ActionRtorrentRenameOptions: SelectGenericOption<ActionContentLayout>[] = [
|
||||
{ label: "No", description: "No", value: "ORIGINAL" },
|
||||
{ label: "Yes", description: "Yes", value: "SUBFOLDER_NONE" }
|
||||
];
|
||||
|
||||
export interface OptionBasic {
|
||||
label: string;
|
||||
value: string;
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue