mirror of https://github.com/langgenius/dify.git
feat: add update from github modal content
This commit is contained in:
parent
43254ceeb0
commit
da15a25cf5
|
|
@ -32,9 +32,14 @@ const UpdatePlugin = () => {
|
|||
payload: {
|
||||
type: PluginSource.github,
|
||||
github: {
|
||||
repo: 'repo_xxx',
|
||||
originalPluginId: 'original_xxx',
|
||||
version: 'version_xxx',
|
||||
originalPackageInfo: {
|
||||
id: '111',
|
||||
repo: 'aaa/bbb',
|
||||
version: 'xxx',
|
||||
url: 'aaa/bbb',
|
||||
currVersion: '1.2.3',
|
||||
currPackage: 'pack1',
|
||||
} as any,
|
||||
},
|
||||
},
|
||||
onCancelCallback: () => {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import { useTranslation } from 'react-i18next'
|
|||
type InstallFromGitHubProps = {
|
||||
updatePayload?: UpdateFromGitHubPayload
|
||||
onClose: () => void
|
||||
onSuccess: () => void
|
||||
}
|
||||
|
||||
const InstallFromGitHub: React.FC<InstallFromGitHubProps> = ({ updatePayload, onClose }) => {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import type { UpdateFromGitHubPayload } from '../types'
|
||||
import InstallFromGitHub from '../install-plugin/install-from-github'
|
||||
|
||||
type Props = {
|
||||
payload: UpdateFromGitHubPayload
|
||||
|
|
@ -11,11 +12,15 @@ type Props = {
|
|||
|
||||
const FromGitHub: FC<Props> = ({
|
||||
payload,
|
||||
onSave,
|
||||
onCancel,
|
||||
}) => {
|
||||
return (
|
||||
<div>
|
||||
{JSON.stringify(payload)}
|
||||
</div>
|
||||
<InstallFromGitHub
|
||||
updatePayload={payload}
|
||||
onClose={onCancel}
|
||||
onSuccess={onSave}
|
||||
/>
|
||||
)
|
||||
}
|
||||
export default React.memo(FromGitHub)
|
||||
|
|
|
|||
Loading…
Reference in New Issue