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:
soup 2023-12-17 21:18:26 +01:00 committed by GitHub
parent 95cd053db5
commit 6e12654f6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 59 additions and 45 deletions

View file

@ -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>

View file

@ -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[];