mirror of
https://github.com/idanoo/autobrr
synced 2025-07-25 09:49:13 +00:00
feat(web): vendor react-hot-toast (#1883)
* feat(web): vendor react-hot-toast * vendor react-hot-toast to be react 19 compatible * feat: remove react-hot-toast and add goober * chore: fix lint warnings
This commit is contained in:
parent
43c28fc0c6
commit
d8f578b5ea
46 changed files with 1071 additions and 59 deletions
|
@ -13,7 +13,6 @@ import {
|
|||
} from "@heroicons/react/24/outline";
|
||||
import { ExclamationCircleIcon } from "@heroicons/react/24/solid";
|
||||
import { format } from "date-fns/format";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
|
@ -21,6 +20,7 @@ import { baseUrl, classNames, simplifyDate } from "@utils";
|
|||
import { SettingsContext } from "@utils/Context";
|
||||
import { EmptySimple } from "@components/emptystates";
|
||||
import { RingResizeSpinner } from "@components/Icons";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
|
||||
type LogEvent = {
|
||||
|
|
|
@ -7,13 +7,13 @@ import React, { useEffect } from "react";
|
|||
import { useForm } from "react-hook-form";
|
||||
import { useMutation, useQuery, useQueryErrorResetBoundary } from "@tanstack/react-query";
|
||||
import { getRouteApi, useRouter } from "@tanstack/react-router";
|
||||
import toast from "react-hot-toast";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faOpenid } from "@fortawesome/free-brands-svg-icons";
|
||||
|
||||
import { RocketLaunchIcon } from "@heroicons/react/24/outline";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import toast from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { Tooltip } from "@components/tooltips/Tooltip";
|
||||
import { PasswordInput, TextInput } from "@components/inputs/text";
|
||||
|
|
|
@ -9,7 +9,6 @@ import { getRouteApi, Link, Outlet, useNavigate } from "@tanstack/react-router";
|
|||
import { Form, Formik, useFormikContext } from "formik";
|
||||
import type { FormikErrors, FormikValues } from "formik";
|
||||
import { z } from "zod";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { toFormikValidationSchema } from "zod-formik-adapter";
|
||||
import { ChevronRightIcon } from "@heroicons/react/24/solid";
|
||||
|
||||
|
@ -21,6 +20,7 @@ import { classNames } from "@utils";
|
|||
import { DOWNLOAD_CLIENTS } from "@domain/constants";
|
||||
|
||||
import { DEBUG } from "@components/debug";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
import { Fragment, useRef, useState } from "react";
|
||||
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from "@headlessui/react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { FilterKeys } from "@api/query_keys";
|
||||
import toast from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
|
||||
import { AutodlIrssiConfigParser } from "./_configParser";
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { Dispatch, FC, Fragment, MouseEventHandler, useCallback, useEffect, useReducer, useRef, useState } from "react";
|
||||
import { Link } from '@tanstack/react-router'
|
||||
import { toast } from "react-hot-toast";
|
||||
import {
|
||||
Listbox,
|
||||
ListboxButton,
|
||||
|
@ -38,6 +37,7 @@ import { useToggle } from "@hooks/hooks";
|
|||
import { APIClient } from "@api/APIClient";
|
||||
import { FilterKeys } from "@api/query_keys";
|
||||
import { FiltersQueryOptions, IndexersOptionsQueryOptions } from "@api/queries";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { EmptyListState } from "@components/emptystates";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { Field, FieldArray, useFormikContext } from "formik";
|
||||
import type { FieldProps, FieldArrayRenderProps } from "formik";
|
||||
|
@ -18,6 +17,7 @@ import { ActionTypeNameMap, ActionTypeOptions, DOWNLOAD_CLIENTS } from "@domain/
|
|||
import { Select, TextField } from "@components/inputs";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
import { EmptyListState } from "@components/emptystates";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { Form, Formik } from "formik";
|
||||
import toast from "react-hot-toast";
|
||||
import { UserIcon } from "@heroicons/react/24/solid";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faOpenid } from "@fortawesome/free-brands-svg-icons";
|
||||
|
@ -13,6 +12,7 @@ import { faOpenid } from "@fortawesome/free-brands-svg-icons";
|
|||
import { APIClient } from "@api/APIClient";
|
||||
import { Section } from "./_components";
|
||||
import { PasswordField, TextField } from "@components/inputs";
|
||||
import toast from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { AuthContext } from "@utils/Context";
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
import { useRef } from "react";
|
||||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { TrashIcon } from "@heroicons/react/24/outline";
|
||||
|
||||
import { KeyField } from "@components/fields/text";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
import { APIKeyAddForm } from "@forms/settings/APIKeyAddForm";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { ApikeysQueryOptions } from "@api/queries";
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { getRouteApi } from "@tanstack/react-router";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { ConfigQueryOptions, UpdatesQueryOptions } from "@api/queries";
|
||||
import { SettingsKeys } from "@api/query_keys";
|
||||
import { SettingsContext } from "@utils/Context";
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { ExternalLink } from "@components/ExternalLink";
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
import { useMemo, useState } from "react";
|
||||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { PlusIcon } from "@heroicons/react/24/solid";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { useToggle } from "@hooks/hooks";
|
||||
import { DownloadClientAddForm, DownloadClientUpdateForm } from "@forms";
|
||||
|
@ -15,6 +14,7 @@ import { APIClient } from "@api/APIClient";
|
|||
import { DownloadClientKeys } from "@api/query_keys";
|
||||
import { DownloadClientsQueryOptions } from "@api/queries";
|
||||
import { ActionTypeNameMap } from "@domain/constants";
|
||||
import toast from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
import { Fragment, useMemo, useRef, useState } from "react";
|
||||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from "@headlessui/react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import {
|
||||
ArrowsRightLeftIcon,
|
||||
DocumentTextIcon,
|
||||
|
@ -21,6 +20,7 @@ import { FeedsQueryOptions } from "@api/queries";
|
|||
import { FeedKeys } from "@api/query_keys";
|
||||
import { useToggle } from "@hooks/hooks";
|
||||
import { baseUrl, classNames, IsEmptyDate, simplifyDate } from "@utils";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { DeleteModal, ForceRunModal } from "@components/modals";
|
||||
import { FeedUpdateForm } from "@forms/settings/FeedForms";
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
import { useMemo, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { PlusIcon } from "@heroicons/react/24/solid";
|
||||
|
||||
|
@ -13,6 +12,7 @@ import { APIClient } from "@api/APIClient";
|
|||
import { IndexerKeys } from "@api/query_keys";
|
||||
import { IndexersQueryOptions } from "@api/queries";
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
import toast from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { EmptySimple } from "@components/emptystates";
|
||||
import { IndexerAddForm, IndexerUpdateForm } from "@forms";
|
||||
|
|
|
@ -7,7 +7,6 @@ import { Fragment, MouseEvent, useEffect, useMemo, useRef, useState } from "reac
|
|||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { ArrowPathIcon, LockClosedIcon, LockOpenIcon, PlusIcon } from "@heroicons/react/24/solid";
|
||||
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from "@headlessui/react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import {
|
||||
ArrowsPointingInIcon,
|
||||
ArrowsPointingOutIcon,
|
||||
|
@ -26,6 +25,7 @@ import { IrcKeys } from "@api/query_keys";
|
|||
import { IrcQueryOptions } from "@api/queries";
|
||||
import { EmptySimple } from "@components/emptystates";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { SettingsContext } from "@utils/Context";
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { getRouteApi } from "@tanstack/react-router";
|
||||
import { toast } from "react-hot-toast";
|
||||
import Select from "react-select";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { ConfigQueryOptions } from "@api/queries";
|
||||
import { SettingsKeys } from "@api/query_keys";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { LogLevelOptions, SelectOption } from "@domain/constants";
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { PlusIcon } from "@heroicons/react/24/solid";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { NotificationKeys } from "@api/query_keys";
|
||||
|
@ -14,6 +13,7 @@ import { EmptySimple } from "@components/emptystates";
|
|||
import { useToggle } from "@hooks/hooks";
|
||||
import { NotificationAddForm, NotificationUpdateForm } from "@forms/settings/NotificationForms";
|
||||
import { componentMapType } from "@forms/settings/DownloadClientForms";
|
||||
import toast from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import {
|
||||
DiscordIcon,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
import { useToggle } from "@hooks/hooks.ts";
|
||||
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { PlusIcon } from "@heroicons/react/24/solid";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { ProxyKeys } from "@api/query_keys";
|
||||
|
@ -15,6 +14,7 @@ import { Section } from "./_components";
|
|||
import { EmptySimple } from "@components/emptystates";
|
||||
import { Checkbox } from "@components/Checkbox";
|
||||
import { ProxyAddForm, ProxyUpdateForm } from "@forms/settings/ProxyForms";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
|
||||
interface ListItemProps {
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
import { useRef, useState } from "react";
|
||||
import { useMutation, useQueryClient, useQuery } from "@tanstack/react-query";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { MultiSelect as RMSC } from "react-multi-select-component";
|
||||
import { AgeSelect } from "@components/inputs"
|
||||
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { ReleaseKeys } from "@api/query_keys";
|
||||
import { toast } from "@components/hot-toast";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { useToggle } from "@hooks/hooks";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue