diff --git a/src/components/modals/edittorrent.tsx b/src/components/modals/edittorrent.tsx index a651c5a..03e9718 100644 --- a/src/components/modals/edittorrent.tsx +++ b/src/components/modals/edittorrent.tsx @@ -23,7 +23,7 @@ import { useForm } from "@mantine/form"; import { useMutateTorrent, useTorrentDetails } from "queries"; import { notifications } from "@mantine/notifications"; import { Checkbox, Grid, LoadingOverlay, NumberInput } from "@mantine/core"; -import { useServerSelectedTorrents, useServerTorrentData } from "rpc/torrent"; +import { useServerRpcVersion, useServerSelectedTorrents, useServerTorrentData } from "rpc/torrent"; interface FormValues { downloadLimited?: boolean, @@ -40,6 +40,7 @@ interface FormValues { } export function EditTorrent(props: ModalState) { + const rpcVersion = useServerRpcVersion(); const serverData = useServerTorrentData(); const selected = useServerSelectedTorrents(); @@ -120,9 +121,10 @@ export function EditTorrent(props: ModalState) { {...form.getInputProps("honorsSessionLimits", { type: "checkbox" })} /> - + {rpcVersion >= 18 && + }