mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(filters): show enabled and disabled actions in list view (#1304)
* feat(filters): reflect enabled actions * dont store release unless enabled action found * store the release after the delay * add new parameter to FindByFilterID method
This commit is contained in:
parent
95cd053db5
commit
6e12654f6a
11 changed files with 59 additions and 45 deletions
|
@ -645,19 +645,20 @@ function FilterListItem({ filter, values, idx }: FilterListItemProps) {
|
|||
to={`${filter.id.toString()}/actions`}
|
||||
className="flex items-center cursor-pointer hover:text-black dark:hover:text-gray-300"
|
||||
>
|
||||
<span className={classNames(!filter.actions_count ? "text-red-500 hover:text-red-400 dark:hover:text-red-400" : "")}>
|
||||
Actions: {filter.actions_count}
|
||||
<span className={filter.actions_count === 0 || filter.actions_enabled_count === 0 ? "text-red-500 hover:text-red-400 dark:hover:text-red-400" : ""}>
|
||||
Actions: {filter.actions_enabled_count}/{filter.actions_count}
|
||||
</span>
|
||||
{!filter.actions_count && (
|
||||
<span className="mr-2 ml-2 flex h-3 w-3 relative">
|
||||
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
}
|
||||
>
|
||||
{!filter.actions_count ? (
|
||||
<>{"You need to setup an action in the filter otherwise you will not get any snatches."}</>
|
||||
{filter.actions_count === 0 ? (
|
||||
<>
|
||||
{"No actions defined. Set up actions to enable snatching."}
|
||||
</>
|
||||
) : filter.actions_enabled_count === 0 ? (
|
||||
<>
|
||||
{"You need to enable at least one action in the filter otherwise you will not get any snatches."}
|
||||
</>
|
||||
) : null}
|
||||
</Tooltip>
|
||||
</span>
|
||||
|
|
1
web/src/types/Filter.d.ts
vendored
1
web/src/types/Filter.d.ts
vendored
|
@ -68,6 +68,7 @@ interface Filter {
|
|||
tags_match_logic: string;
|
||||
except_tags_match_logic: string;
|
||||
actions_count: number;
|
||||
actions_enabled_count: number;
|
||||
actions: Action[];
|
||||
indexers: Indexer[];
|
||||
external: ExternalFilter[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue