mirror of https://github.com/langgenius/dify.git
install from settings
This commit is contained in:
parent
f70c23dd7a
commit
1f1c61541e
|
|
@ -222,7 +222,7 @@ const ModelProviderPage = ({ searchText }: Props) => {
|
|||
{!collapse && !isPluginsLoading && (
|
||||
<div className='grid grid-cols-2 gap-2'>
|
||||
{plugins.map(plugin => (
|
||||
<ProviderCard key={plugin.plugin_id} payload={plugin} />
|
||||
<ProviderCard key={plugin.plugin_id} payload={plugin} onSuccess={updateModelProviders} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@ import { useBoolean } from 'ahooks'
|
|||
type Props = {
|
||||
className?: string
|
||||
payload: Plugin
|
||||
onSuccess: () => void
|
||||
}
|
||||
|
||||
const ProviderCard: FC<Props> = ({
|
||||
className,
|
||||
payload,
|
||||
onSuccess,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const [isShowInstallFromMarketplace, {
|
||||
|
|
@ -84,7 +86,10 @@ const ProviderCard: FC<Props> = ({
|
|||
manifest={payload as any}
|
||||
uniqueIdentifier={payload.latest_package_identifier}
|
||||
onClose={hideInstallFromMarketplace}
|
||||
onSuccess={hideInstallFromMarketplace}
|
||||
onSuccess={() => {
|
||||
onSuccess()
|
||||
hideInstallFromMarketplace()
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue