mirror of
https://github.com/idanoo/autobrr
synced 2025-07-25 17:59:14 +00:00
feat(indexers): test API from settings (#829)
* refactor(indexers): test api clients * feat(indexers): test api connection * fix(indexers): api client tests * refactor: indexer api clients * feat: add Toasts for indexer api tests * fix: failing red tests
This commit is contained in:
parent
fb9dcc23a0
commit
f3cfeed8cd
19 changed files with 475 additions and 191 deletions
|
@ -22,6 +22,7 @@ interface SlideOverProps<DataType> {
|
|||
isTesting?: boolean;
|
||||
isTestSuccessful?: boolean;
|
||||
isTestError?: boolean;
|
||||
extraButtons?: (values: DataType) => React.ReactNode;
|
||||
}
|
||||
|
||||
function SlideOver<DataType>({
|
||||
|
@ -37,7 +38,8 @@ function SlideOver<DataType>({
|
|||
testFn,
|
||||
isTesting,
|
||||
isTestSuccessful,
|
||||
isTestError
|
||||
isTestError,
|
||||
extraButtons
|
||||
}: SlideOverProps<DataType>): React.ReactElement {
|
||||
const cancelModalButtonRef = useRef<HTMLInputElement | null>(null);
|
||||
const [deleteModalIsOpen, toggleDeleteModal] = useToggle(false);
|
||||
|
@ -125,6 +127,10 @@ function SlideOver<DataType>({
|
|||
</button>
|
||||
)}
|
||||
<div>
|
||||
{!!values && extraButtons !== undefined && (
|
||||
extraButtons(values)
|
||||
)}
|
||||
|
||||
{testFn && (
|
||||
<button
|
||||
type="button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue