refactor(web): migrate plugin toast usage to new UI toast API and update tests (#34001)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
yyh
2026-03-24 14:02:52 +08:00
committed by GitHub
parent 8b634a9bee
commit b0920ecd17
41 changed files with 390 additions and 339 deletions

View File

@ -7,7 +7,7 @@ import { useBoolean } from 'ahooks'
import * as React from 'react'
import { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import Toast from '@/app/components/base/toast'
import { toast } from '@/app/components/base/ui/toast'
import { useModalContext } from '@/context/modal-context'
import { uninstallPlugin } from '@/service/plugins'
import { useInvalidateInstalledPluginList } from '@/service/use-plugins'
@ -65,7 +65,7 @@ const Action: FC<Props> = ({
if (fetchedReleases.length === 0)
return
const { needUpdate, toastProps } = checkForUpdates(fetchedReleases, meta!.version)
Toast.notify(toastProps)
toast(toastProps.message, { type: toastProps.type })
if (needUpdate) {
setShowUpdatePluginModal({
onSaveCallback: () => {