chore: handle verified
This commit is contained in:
parent
15acfffd60
commit
8d8d5b5235
@ -36,7 +36,7 @@ const Card = ({
|
||||
}: Props) => {
|
||||
const locale = useGetLanguage()
|
||||
|
||||
const { type, name, org, label, brief, icon } = payload
|
||||
const { type, name, org, label, brief, icon, verified } = payload
|
||||
|
||||
const getLocalizedText = (obj: Record<string, string> | undefined) =>
|
||||
obj?.[locale] || obj?.['en-US'] || ''
|
||||
@ -60,7 +60,7 @@ const Card = ({
|
||||
<div className="ml-3 grow">
|
||||
<div className="flex items-center h-5">
|
||||
<Title title={getLocalizedText(label)} />
|
||||
<RiVerifiedBadgeLine className="shrink-0 ml-0.5 w-4 h-4 text-text-accent" />
|
||||
{verified && <RiVerifiedBadgeLine className="shrink-0 ml-0.5 w-4 h-4 text-text-accent" />}
|
||||
{titleLeft} {/* This can be version badge */}
|
||||
</div>
|
||||
<OrgInfo
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Plugin, PluginDeclaration } from "../types"
|
||||
import type { Plugin, PluginDeclaration } from '../types'
|
||||
|
||||
export const pluginManifestToCardPluginProps = (pluginManifest: PluginDeclaration): Plugin => {
|
||||
return {
|
||||
@ -11,11 +11,12 @@ export const pluginManifestToCardPluginProps = (pluginManifest: PluginDeclaratio
|
||||
label: pluginManifest.label,
|
||||
brief: pluginManifest.description,
|
||||
icon: pluginManifest.icon,
|
||||
verified: pluginManifest.verified,
|
||||
introduction: '',
|
||||
repository: '',
|
||||
install_count: 0,
|
||||
endpoint: {
|
||||
settings: []
|
||||
}
|
||||
settings: [],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ export type Plugin = {
|
||||
version: string
|
||||
latest_version: string
|
||||
icon: string
|
||||
verified: boolean
|
||||
label: Record<Locale, string>
|
||||
brief: Record<Locale, string>
|
||||
// Repo readme.md content
|
||||
|
Loading…
Reference in New Issue
Block a user