mirror of https://github.com/langgenius/dify.git
fix icon of model provider
This commit is contained in:
parent
2e3442f74c
commit
a867040b88
|
|
@ -14,6 +14,7 @@ import type {
|
|||
} from './types'
|
||||
import {
|
||||
getMarketplaceCollectionsAndPlugins,
|
||||
getPluginIconInMarketplace,
|
||||
} from './utils'
|
||||
import i18n from '@/i18n/i18next-config'
|
||||
import { useMutationPluginsFromMarketplace } from '@/service/use-plugins'
|
||||
|
|
@ -61,7 +62,10 @@ export const useMarketplacePlugins = () => {
|
|||
})
|
||||
|
||||
return {
|
||||
plugins: data?.data?.plugins,
|
||||
plugins: data?.data?.plugins.map(plugin => ({
|
||||
...plugin,
|
||||
icon: getPluginIconInMarketplace(plugin),
|
||||
})),
|
||||
resetPlugins: reset,
|
||||
queryPlugins,
|
||||
queryPluginsWithDebounced,
|
||||
|
|
|
|||
|
|
@ -64,17 +64,17 @@ const ProviderCard: FC<Props> = ({
|
|||
className='hidden group-hover:flex items-center gap-2 absolute bottom-0 left-0 right-0 p-4 pt-8 rounded-xl bg-gradient-to-tr from-[#f9fafb] to-[rgba(249,250,251,0)]'
|
||||
>
|
||||
<Button
|
||||
className='flex-grow'
|
||||
className='grow'
|
||||
variant='primary'
|
||||
onClick={showInstallFromMarketplace}
|
||||
>
|
||||
{t('plugin.detailPanel.operation.install')}
|
||||
</Button>
|
||||
<Button
|
||||
className='flex-grow'
|
||||
className='grow'
|
||||
variant='secondary'
|
||||
>
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugin/${payload.org}/${payload.name}`} target='_blank' className='flex items-center gap-0.5'>
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugins/${payload.org}/${payload.name}`} target='_blank' className='flex items-center gap-0.5'>
|
||||
{t('plugin.detailPanel.operation.detail')}
|
||||
<RiArrowRightUpLine className='w-4 h-4' />
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue