IRC
Networks, channels and invite commands are configured automatically.
@@ -94,7 +94,7 @@ const FeedSettingFields = (ind: IndexerDefinition, indexer: string) => {
{ind && ind.torznab && ind.torznab.settings && (
-
+
Torznab
Torznab feed
@@ -329,13 +329,13 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) {
-
+
@@ -391,9 +391,7 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) {
-
-
-
+
{SettingFields(indexer, values.identifier)}
@@ -504,7 +502,7 @@ export function IndexerUpdateForm({ isOpen, toggle, indexer }: UpdateProps) {
...o,
[obj.name]: obj.value
} as Record
),
- {} as Record
+ {} as Record
)
};
@@ -519,16 +517,14 @@ export function IndexerUpdateForm({ isOpen, toggle, indexer }: UpdateProps) {
initialValues={initialValues}
>
{() => (
-
-
-
-
-
+
+
+
{({ field, meta }: FieldProps) => (
@@ -542,11 +538,7 @@ export function IndexerUpdateForm({ isOpen, toggle, indexer }: UpdateProps) {
)}
-
-
-
-
-
+
{renderSettingFields(indexer.settings)}
)}
diff --git a/web/src/forms/settings/IrcForms.tsx b/web/src/forms/settings/IrcForms.tsx
index dfa118c..36ab871 100644
--- a/web/src/forms/settings/IrcForms.tsx
+++ b/web/src/forms/settings/IrcForms.tsx
@@ -24,7 +24,7 @@ const ChannelsFieldArray = ({ channels }: ChannelsFieldArrayProps) => (
{({ remove, push }) => (
-
+
{channels && channels.length > 0 ? (
channels.map((_channel: IrcChannel, index: number) => (
@@ -68,7 +68,7 @@ const ChannelsFieldArray = ({ channels }: ChannelsFieldArrayProps) => (
))
) : (
- No channels!
+ No channels!
)}
)}
@@ -159,34 +159,47 @@ export function IrcNetworkAddForm({ isOpen, toggle }: AddFormProps) {
validate={validate}
>
{(values) => (
- <>
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
- >
+
)}
);
@@ -290,34 +303,51 @@ export function IrcNetworkUpdateForm({
validate={validate}
>
{(values) => (
- <>
-
+
+
-
+
+
+
-
-
-
+
-
-
-
+
-
-
-
+
+
-
-
-
-
-
-
-
-
+
- >
+
)}
);
diff --git a/web/src/forms/settings/NotifiactionForms.tsx b/web/src/forms/settings/NotificationForms.tsx
similarity index 88%
rename from web/src/forms/settings/NotifiactionForms.tsx
rename to web/src/forms/settings/NotificationForms.tsx
index bd44830..ced4d36 100644
--- a/web/src/forms/settings/NotifiactionForms.tsx
+++ b/web/src/forms/settings/NotificationForms.tsx
@@ -62,11 +62,11 @@ const Option = (props: OptionProps) => {
function FormFieldsDiscord() {
return (
-
-
+
+
@@ -82,11 +82,11 @@ function FormFieldsDiscord() {
function FormFieldsTelegram() {
return (
-
-
+
+
@@ -161,9 +161,15 @@ export function NotificationAddForm({ isOpen, toggle }: AddProps) {
return (
-
-
+
+
-
-
+
-
-
-
+
-
-
-
Events
+
+
+
+ Events
+
Select what events to trigger on
-
-
{componentMap[values.type]}
-
@@ -432,8 +447,8 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
-
-
+
+
-
-
-
-
-
-
-
+
+
+
Events
@@ -491,7 +502,7 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
-
diff --git a/web/src/screens/Settings.tsx b/web/src/screens/Settings.tsx
index c54f2b7..b108306 100644
--- a/web/src/screens/Settings.tsx
+++ b/web/src/screens/Settings.tsx
@@ -46,7 +46,7 @@ function SubNavLink({ item }: NavLinkProps) {
className={({ isActive }) => classNames(
"border-transparent text-gray-900 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-gray-300 group border-l-4 px-3 py-2 flex items-center text-sm font-medium",
isActive ?
- "bg-teal-50 dark:bg-gray-700 border-teal-500 dark:border-blue-500 text-teal-700 dark:text-white hover:bg-teal-50 dark:hover:bg-gray-500 hover:text-teal-700 dark:hover:text-gray-200" : ""
+ "font-bold bg-teal-50 dark:bg-gray-700 border-teal-500 dark:border-blue-500 text-teal-700 dark:text-white hover:bg-teal-50 dark:hover:bg-gray-500 hover:text-teal-700 dark:hover:text-gray-200" : ""
)}
aria-current={splitLocation[2] === item.href ? "page" : undefined}
>
diff --git a/web/src/screens/filters/details.tsx b/web/src/screens/filters/details.tsx
index 07ea6bf..1912438 100644
--- a/web/src/screens/filters/details.tsx
+++ b/web/src/screens/filters/details.tsx
@@ -609,6 +609,266 @@ export function FilterActions({ filter, values }: FilterActionsProps) {
);
}
+interface TypeFormProps {
+ action: Action;
+ idx: number;
+ clients: Array
;
+}
+
+const TypeForm = ({ action, idx, clients }: TypeFormProps) => {
+ switch (action.type) {
+ case "TEST":
+ return (
+
+ );
+ case "EXEC":
+ return (
+
+ );
+ case "WATCH_FOLDER":
+ return (
+
+
+
+ );
+ case "WEBHOOK":
+ return (
+
+
+
+
+ );
+ case "QBITTORRENT":
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ case "DELUGE_V1":
+ case "DELUGE_V2":
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ case "TRANSMISSION":
+ return (
+
+ );
+ case "RADARR":
+ case "SONARR":
+ case "LIDARR":
+ case "WHISPARR":
+ return (
+
+
+
+ );
+
+ default:
+ return null;
+ }
+};
+
interface FilterActionsItemProps {
action: Action;
clients: DownloadClient[];
@@ -617,255 +877,10 @@ interface FilterActionsItemProps {
}
function FilterActionsItem({ action, clients, idx, remove }: FilterActionsItemProps) {
- const [deleteModalIsOpen, toggleDeleteModal] = useToggle(false);
- const [edit, toggleEdit] = useToggle(false);
-
const cancelButtonRef = useRef(null);
- const TypeForm = (actionType: ActionType) => {
- switch (actionType) {
- case "TEST":
- return (
-
- );
- case "EXEC":
- return (
-
- );
- case "WATCH_FOLDER":
- return (
-
-
-
- );
- case "WEBHOOK":
- return (
-
-
-
-
- );
- case "QBITTORRENT":
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- case "DELUGE_V1":
- case "DELUGE_V2":
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- case "TRANSMISSION":
- return (
-
- );
- case "RADARR":
- case "SONARR":
- case "LIDARR":
- case "WHISPARR":
- return (
-
-
-
- );
-
- default:
- return null;
- }
- };
+ const [deleteModalIsOpen, toggleDeleteModal] = useToggle(false);
+ const [edit, toggleEdit] = useToggle(false);
return (
@@ -966,7 +981,7 @@ function FilterActionsItem({ action, clients, idx, remove }: FilterActionsItemPr
- {TypeForm(action.type)}
+
diff --git a/web/src/screens/filters/list.tsx b/web/src/screens/filters/list.tsx
index 11f9537..7d8ec16 100644
--- a/web/src/screens/filters/list.tsx
+++ b/web/src/screens/filters/list.tsx
@@ -72,7 +72,7 @@ interface FilterListProps {
function FilterList({ filters }: FilterListProps) {
return (
-
+
@@ -80,7 +80,7 @@ function FilterList({ filters }: FilterListProps) {
{label}
|
diff --git a/web/src/screens/settings/Action.tsx b/web/src/screens/settings/Action.tsx
index 1f8a1ad..4bb8437 100644
--- a/web/src/screens/settings/Action.tsx
+++ b/web/src/screens/settings/Action.tsx
@@ -1,26 +1,20 @@
function ActionSettings() {
return (
-
-
-
+
- {/*{addClientIsOpen &&*/}
- {/*
*/}
- {/*}*/}
Actions
- Manage actions.
+ Manage actions.
@@ -36,25 +30,25 @@ function ActionSettings() {
scope="col"
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
>
- Name
+ Name
- Type
+ Type
|
- Port
+ Port
|
- Enabled
+ Enabled
|
Edit
diff --git a/web/src/screens/settings/Application.tsx b/web/src/screens/settings/Application.tsx
index 64a64b9..f506742 100644
--- a/web/src/screens/settings/Application.tsx
+++ b/web/src/screens/settings/Application.tsx
@@ -23,7 +23,7 @@ function ApplicationSettings() {
Application
- Application settings. Change in config.toml and restart to take effect.
+ Application settings. Change in config.toml and restart to take effect.
@@ -31,7 +31,7 @@ function ApplicationSettings() {
@@ -80,19 +80,21 @@ function ApplicationSettings() {
{data?.version ? (
Version:
- {data?.version}
+
+ {data?.version}
+
) : null}
{data?.commit ? (
Commit:
- {data.commit}
+ {data.commit}
) : null}
{data?.date ? (
Date:
- {data?.date}
+ {data?.date}
) : null}
@@ -123,7 +125,6 @@ function ApplicationSettings() {
-
);
}
diff --git a/web/src/screens/settings/DownloadClient.tsx b/web/src/screens/settings/DownloadClient.tsx
index c95715d..1e5d06d 100644
--- a/web/src/screens/settings/DownloadClient.tsx
+++ b/web/src/screens/settings/DownloadClient.tsx
@@ -86,7 +86,7 @@ function DownloadClientSettings() {
return (An error has occurred: );
return (
-
+
@@ -121,25 +121,25 @@ function DownloadClientSettings() {
scope="col"
className="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"
>
- Enabled
+ Enabled
|
- Name
+ Name
|
- Host
+ Host
|
- Type
+ Type
|
Edit
diff --git a/web/src/screens/settings/Feed.tsx b/web/src/screens/settings/Feed.tsx
index e08a02b..3390cc8 100644
--- a/web/src/screens/settings/Feed.tsx
+++ b/web/src/screens/settings/Feed.tsx
@@ -27,13 +27,13 @@ function FeedSettings() {
);
return (
-
+
Feeds
- Manage Torznab feeds.
+ Manage Torznab feeds.
diff --git a/web/src/screens/settings/Indexer.tsx b/web/src/screens/settings/Indexer.tsx
index 49c1f2b..eca2ed3 100644
--- a/web/src/screens/settings/Indexer.tsx
+++ b/web/src/screens/settings/Indexer.tsx
@@ -82,7 +82,7 @@ function IndexerSettings() {
return ( An error has occurred );
return (
-
+
diff --git a/web/src/screens/settings/Irc.tsx b/web/src/screens/settings/Irc.tsx
index 3e84872..4be550f 100644
--- a/web/src/screens/settings/Irc.tsx
+++ b/web/src/screens/settings/Irc.tsx
@@ -1,41 +1,35 @@
import { useQuery } from "react-query";
-import {
- simplifyDate,
- IsEmptyDate
-} from "../../utils";
-import {
- IrcNetworkAddForm,
- IrcNetworkUpdateForm
-} from "../../forms";
+import { simplifyDate, IsEmptyDate, classNames } from "../../utils";
+import { IrcNetworkAddForm, IrcNetworkUpdateForm } from "../../forms";
import { useToggle } from "../../hooks/hooks";
import { APIClient } from "../../api/APIClient";
import { EmptySimple } from "../../components/emptystates";
-import {ExclamationCircleIcon} from "@heroicons/react/outline";
+import { ExclamationCircleIcon } from "@heroicons/react/outline";
+import { LockClosedIcon, LockOpenIcon } from "@heroicons/react/solid";
export const IrcSettings = () => {
const [addNetworkIsOpen, toggleAddNetwork] = useToggle(false);
- const { data } = useQuery(
- "networks",
- () => APIClient.irc.getNetworks(),
- {
- refetchOnWindowFocus: false,
- // Refetch every 3 seconds
- refetchInterval: 3000
- }
- );
+ const { data } = useQuery("networks", () => APIClient.irc.getNetworks(), {
+ refetchOnWindowFocus: false,
+ // Refetch every 3 seconds
+ refetchInterval: 3000
+ });
return (
-
+
- IRC
+
+ IRC
+
- IRC networks and channels. Click on a network to view channel status.
+ IRC networks and channels. Click on a network to view channel
+ status.
@@ -44,35 +38,46 @@ export const IrcSettings = () => {
onClick={toggleAddNetwork}
className="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 dark:bg-blue-600 hover:bg-indigo-700 dark:hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
>
- Add new
+ Add new
-
{data && data.length > 0 ? (
-
- {/*
Enabled */}
- Network
- Server
- Nick
+
+ Network
+
+
+ Server
+
+
+ Nick
+
-
- {data && data.map((network, idx) => (
-
- ))}
+ {data &&
+ data.map((network, idx) => (
+
+ ))}
- ) : }
+ ) : (
+
+ )}
);
};
interface ListItemProps {
- idx: number;
- network: IrcNetworkWithHealth;
+ idx: number;
+ network: IrcNetworkWithHealth;
}
const ListItem = ({ idx, network }: ListItemProps) => {
@@ -80,33 +85,91 @@ const ListItem = ({ idx, network }: ListItemProps) => {
const [edit, toggleEdit] = useToggle(false);
return (
+
+
+
-
-
-
-
-
-
- {
- network.enabled ? (
- networkHealthy(network) ? (
-
-
-
+
+
+
+ {network.enabled ? (
+ IsNetworkHealthy(network) ? (
+
+
+
- ) :
- ) :
- }
- {network.name}
-
+ ) : (
+
+
+
+ )
+ ) : (
+
+ )}
+
+
+ {network.name}
+
+
+
+
+
+
+ {network.tls ? (
+
+ ) : (
+
+ )}
+
+
+ {network.server}:{network.port}
+
+
-
- {network.server}:{network.port} {network.tls && TLS}
{network.nickserv && network.nickserv.account ? (
- {network.nickserv.account}
- ) : }
+
+
+ {network.nickserv.account}
+
+
+ ) : (
+
+ )}
-
+
Edit
@@ -117,39 +180,58 @@ const ListItem = ({ idx, network }: ListItemProps) => {
{network.channels.length > 0 ? (
-
-
Channel
- Monitoring since
- Last announce
+
+ Channel
+
+
+ Monitoring since
+
+
+ Last announce
+
- {network.channels.map(c => (
+ {network.channels.map((c) => (
-
- {
- network.enabled ? (
- c.monitoring ? (
-
-
-
-
- ) :
- ) :
- }
+ {network.enabled ? (
+ c.monitoring ? (
+
+
+
+
+ ) : (
+
+ )
+ ) : (
+
+ )}
{c.name}
- {IsEmptyDate(c.monitoring_since)}
+
+ {IsEmptyDate(c.monitoring_since)}
+
- {IsEmptyDate(c.last_announce)}
+
+ {IsEmptyDate(c.last_announce)}
+
))}
- ) : }
+ ) : (
+
+ )}
)}
@@ -157,10 +239,5 @@ const ListItem = ({ idx, network }: ListItemProps) => {
);
};
-function networkHealthy(network: IrcNetworkWithHealth): boolean {
- if (network.connection_errors.length > 0) {
- return false
- }
-
- return true
-}
\ No newline at end of file
+const IsNetworkHealthy = (network: IrcNetworkWithHealth) =>
+ network.connection_errors.length <= 0;
diff --git a/web/src/screens/settings/Notifications.tsx b/web/src/screens/settings/Notifications.tsx
index 14ed96f..5cdcc76 100644
--- a/web/src/screens/settings/Notifications.tsx
+++ b/web/src/screens/settings/Notifications.tsx
@@ -2,7 +2,7 @@ import { useQuery } from "react-query";
import { APIClient } from "../../api/APIClient";
import { EmptySimple } from "../../components/emptystates";
import { useToggle } from "../../hooks/hooks";
-import { NotificationAddForm, NotificationUpdateForm } from "../../forms/settings/NotifiactionForms";
+import { NotificationAddForm, NotificationUpdateForm } from "../../forms/settings/NotificationForms";
import { Switch } from "@headlessui/react";
import { classNames } from "../../utils";
import { componentMapType } from "../../forms/settings/DownloadClientForms";
diff --git a/web/src/screens/settings/Releases.tsx b/web/src/screens/settings/Releases.tsx
index 0df3eb4..2d4849d 100644
--- a/web/src/screens/settings/Releases.tsx
+++ b/web/src/screens/settings/Releases.tsx
@@ -28,7 +28,11 @@ function ReleaseSettings() {
const cancelModalButtonRef = useRef(null);
return (
-
@@ -50,25 +56,21 @@ function ReleaseSettings() {
-
- Danger Zone
+
+ Danger Zone
+
-
-
-
- Delete all releases
-
-
-
-
+
+
+
|