chore: update the update plugin steps
This commit is contained in:
parent
7cb6039833
commit
392db19ea2
@ -1,6 +1,6 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import React, { useCallback, useEffect, useState } from 'react'
|
import React, { useCallback, useState } from 'react'
|
||||||
import Modal from '@/app/components/base/modal'
|
import Modal from '@/app/components/base/modal'
|
||||||
import type { Item } from '@/app/components/base/select'
|
import type { Item } from '@/app/components/base/select'
|
||||||
import type { InstallState } from '@/app/components/plugins/types'
|
import type { InstallState } from '@/app/components/plugins/types'
|
||||||
@ -35,7 +35,7 @@ const InstallFromGitHub: React.FC<InstallFromGitHubProps> = ({ updatePayload, on
|
|||||||
: '',
|
: '',
|
||||||
selectedVersion: '',
|
selectedVersion: '',
|
||||||
selectedPackage: '',
|
selectedPackage: '',
|
||||||
releases: [],
|
releases: updatePayload ? updatePayload.originalPackageInfo.releases : [],
|
||||||
})
|
})
|
||||||
const [uniqueIdentifier, setUniqueIdentifier] = useState<string | null>(null)
|
const [uniqueIdentifier, setUniqueIdentifier] = useState<string | null>(null)
|
||||||
const [manifest, setManifest] = useState<PluginDeclaration | null>(null)
|
const [manifest, setManifest] = useState<PluginDeclaration | null>(null)
|
||||||
@ -133,11 +133,6 @@ const InstallFromGitHub: React.FC<InstallFromGitHubProps> = ({ updatePayload, on
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (state.step === InstallStepFromGitHub.selectPackage)
|
|
||||||
handleUrlSubmit()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
isShow={true}
|
isShow={true}
|
||||||
|
@ -74,6 +74,7 @@ const Action: FC<Props> = ({
|
|||||||
repo: `https://github.com/${meta!.repo}`,
|
repo: `https://github.com/${meta!.repo}`,
|
||||||
version: meta!.version,
|
version: meta!.version,
|
||||||
package: meta!.package,
|
package: meta!.package,
|
||||||
|
releases: fetchedReleases,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -155,6 +155,7 @@ export type UpdateFromGitHubPayload = {
|
|||||||
repo: string
|
repo: string
|
||||||
version: string
|
version: string
|
||||||
package: string
|
package: string
|
||||||
|
releases: GitHubRepoReleaseResponse[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user