From 85947efcfab306efbe715e8fb952a2b177cec7d6 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 5 Nov 2024 15:21:07 +0800 Subject: [PATCH] temp: change payload types --- .../install-plugin/install-from-github/index.tsx | 4 ++-- web/app/components/plugins/types.ts | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/web/app/components/plugins/install-plugin/install-from-github/index.tsx b/web/app/components/plugins/install-plugin/install-from-github/index.tsx index 22c25ab1ab..a064cab53e 100644 --- a/web/app/components/plugins/install-plugin/install-from-github/index.tsx +++ b/web/app/components/plugins/install-plugin/install-from-github/index.tsx @@ -6,7 +6,7 @@ import type { Item } from '@/app/components/base/select' import type { InstallState } from '@/app/components/plugins/types' import { useGitHubReleases, useGitHubUpload } from '../hooks' import { parseGitHubUrl } from '../utils' -import type { PluginDeclaration, UpdatePluginPayload } from '../../types' +import type { PluginDeclaration, UpdateFromGitHubPayload } from '../../types' import { InstallStepFromGitHub } from '../../types' import Toast from '@/app/components/base/toast' import SetURL from './steps/setURL' @@ -16,7 +16,7 @@ import Loaded from './steps/loaded' import { useTranslation } from 'react-i18next' type InstallFromGitHubProps = { - updatePayload?: UpdatePluginPayload + updatePayload?: UpdateFromGitHubPayload onClose: () => void } diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index 3bcf724080..f58d870fe9 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -70,12 +70,6 @@ export type PluginDeclaration = { model: any // TODO } -export type UpdatePluginPayload = { - url: string - currVersion: string - currPackage: string -} - export type PluginManifestInMarket = { name: string org: string @@ -151,9 +145,11 @@ export type UpdateFromMarketPlacePayload = { } export type UpdateFromGitHubPayload = { - repo: string - originalPluginId: string - version: string + originalPackageInfo: { + repo: string + originalPluginId: string + version: string + } } export type UpdatePluginPayload = {