mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(indexes): toggle on and off with switch (#1164)
* chore(indexers): replace array position with id * fix(indexers): enable and disable without editing * feat(indexer): add toggle endpoint and refactoring --------- Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
parent
603191b47d
commit
8600d3a2ab
7 changed files with 167 additions and 50 deletions
|
@ -263,7 +263,7 @@ const ListItem = ({ network, expanded }: ListItemProps) => {
|
|||
/>
|
||||
<div className="col-span-2 md:col-span-1 flex pl-5 text-gray-500 dark:text-gray-400">
|
||||
<Switch
|
||||
onClick={(e: MouseEvent) => e.stopPropagation()}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
checked={network.enabled}
|
||||
onChange={onToggleMutation}
|
||||
className={classNames(
|
||||
|
@ -478,7 +478,7 @@ const ListItemDropdown = ({
|
|||
const restart = (id: number) => restartMutation.mutate(id);
|
||||
|
||||
return (
|
||||
<Menu
|
||||
<Menu
|
||||
as="div"
|
||||
onClick={(e: MouseEvent) => {
|
||||
e.preventDefault();
|
||||
|
@ -787,4 +787,3 @@ const IRCLogsDropdown = () => {
|
|||
</Menu>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue