mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(filters): hide tooltip when actions are active (#1318)
This commit is contained in:
parent
4884fec89c
commit
0ab404f81a
1 changed files with 33 additions and 22 deletions
|
@ -639,28 +639,39 @@ function FilterListItem({ filter, values, idx }: FilterListItemProps) {
|
||||||
) : filter.priority}
|
) : filter.priority}
|
||||||
</span>
|
</span>
|
||||||
<span className="z-10 whitespace-nowrap text-xs font-medium text-gray-600 dark:text-gray-400">
|
<span className="z-10 whitespace-nowrap text-xs font-medium text-gray-600 dark:text-gray-400">
|
||||||
<Tooltip
|
{filter.actions_count === 0 || filter.actions_enabled_count === 0 ? (
|
||||||
label={
|
<Tooltip
|
||||||
<Link
|
label={
|
||||||
to={`${filter.id.toString()}/actions`}
|
<Link
|
||||||
className="flex items-center cursor-pointer hover:text-black dark:hover:text-gray-300"
|
to={`${filter.id.toString()}/actions`}
|
||||||
>
|
className="flex items-center cursor-pointer hover:text-black dark:hover:text-gray-300"
|
||||||
<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 className={filter.actions_count === 0 || filter.actions_enabled_count === 0 ? "text-red-500 hover:text-red-400 dark:hover:text-red-400" : ""}>
|
||||||
</span>
|
Actions: {filter.actions_enabled_count}/{filter.actions_count}
|
||||||
</Link>
|
</span>
|
||||||
}
|
</Link>
|
||||||
>
|
}
|
||||||
{filter.actions_count === 0 ? (
|
>
|
||||||
<>
|
{filter.actions_count === 0 ? (
|
||||||
{"No actions defined. Set up actions to enable snatching."}
|
<>
|
||||||
</>
|
{"No actions defined. Set up actions to enable snatching."}
|
||||||
) : filter.actions_enabled_count === 0 ? (
|
</>
|
||||||
<>
|
) : filter.actions_enabled_count === 0 ? (
|
||||||
{"You need to enable at least one action in the filter otherwise you will not get any snatches."}
|
<>
|
||||||
</>
|
{"You need to enable at least one action in the filter otherwise you will not get any snatches."}
|
||||||
) : null}
|
</>
|
||||||
</Tooltip>
|
) : null}
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
<Link
|
||||||
|
to={`${filter.id.toString()}/actions`}
|
||||||
|
className="flex items-center cursor-pointer hover:text-black dark:hover:text-gray-300"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Actions: {filter.actions_enabled_count}/{filter.actions_count}
|
||||||
|
</span>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue