chore: support update show version
This commit is contained in:
parent
57756b18e4
commit
b93be49530
@ -76,9 +76,10 @@ const PluginPage = ({
|
||||
await sleep(100)
|
||||
if (packageId) {
|
||||
const { data } = await fetchManifestFromMarketPlace(encodeURIComponent(packageId))
|
||||
const { plugin } = data
|
||||
const { plugin, version } = data
|
||||
setManifest({
|
||||
...plugin,
|
||||
version: version.version,
|
||||
icon: `${marketplaceApiPrefix}/plugins/${plugin.org}/${plugin.name}/icon`,
|
||||
})
|
||||
showInstallFromMarketplace()
|
||||
|
@ -79,7 +79,7 @@ export type PluginManifestInMarket = {
|
||||
icon: string
|
||||
label: Record<Locale, string>
|
||||
category: PluginType
|
||||
version: string // TODO: wait api return current plugin version
|
||||
version: string // conbine the other place to it
|
||||
latest_version: string
|
||||
brief: Record<Locale, string>
|
||||
introduction: string
|
||||
|
@ -63,7 +63,7 @@ export const fetchManifest = async (uniqueIdentifier: string) => {
|
||||
}
|
||||
|
||||
export const fetchManifestFromMarketPlace = async (uniqueIdentifier: string) => {
|
||||
return getMarketplace<{ data: { plugin: PluginManifestInMarket } }>(`/plugins/identifier?unique_identifier=${uniqueIdentifier}`)
|
||||
return getMarketplace<{ data: { plugin: PluginManifestInMarket, version: { version: string } } }>(`/plugins/identifier?unique_identifier=${uniqueIdentifier}`)
|
||||
}
|
||||
|
||||
export const fetchMarketplaceCollections: Fetcher<MarketplaceCollectionsResponse, { url: string; }> = ({ url }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user