|
|
|
|
|
|
|
|
PortalToFollowElemTrigger, |
|
|
PortalToFollowElemTrigger, |
|
|
} from '@/app/components/base/portal-to-follow-elem' |
|
|
} from '@/app/components/base/portal-to-follow-elem' |
|
|
import cn from '@/utils/classnames' |
|
|
import cn from '@/utils/classnames' |
|
|
|
|
|
import { useGlobalPublicStore } from '@/context/global-public-context' |
|
|
|
|
|
|
|
|
type Props = { |
|
|
type Props = { |
|
|
source: PluginSource |
|
|
source: PluginSource |
|
|
|
|
|
|
|
|
setOpen(!openRef.current) |
|
|
setOpen(!openRef.current) |
|
|
}, [setOpen]) |
|
|
}, [setOpen]) |
|
|
|
|
|
|
|
|
|
|
|
const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures) |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<PortalToFollowElem |
|
|
<PortalToFollowElem |
|
|
open={open} |
|
|
open={open} |
|
|
|
|
|
|
|
|
className='system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover' |
|
|
className='system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover' |
|
|
>{t('plugin.detailPanel.operation.checkUpdate')}</div> |
|
|
>{t('plugin.detailPanel.operation.checkUpdate')}</div> |
|
|
)} |
|
|
)} |
|
|
{(source === PluginSource.marketplace || source === PluginSource.github) && ( |
|
|
|
|
|
|
|
|
{(source === PluginSource.marketplace || source === PluginSource.github) && enable_marketplace && ( |
|
|
<a href={detailUrl} target='_blank' className='system-md-regular flex cursor-pointer items-center rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover'> |
|
|
<a href={detailUrl} target='_blank' className='system-md-regular flex cursor-pointer items-center rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover'> |
|
|
<span className='grow'>{t('plugin.detailPanel.operation.viewDetail')}</span> |
|
|
<span className='grow'>{t('plugin.detailPanel.operation.viewDetail')}</span> |
|
|
<RiArrowRightUpLine className='h-3.5 w-3.5 shrink-0 text-text-tertiary' /> |
|
|
<RiArrowRightUpLine className='h-3.5 w-3.5 shrink-0 text-text-tertiary' /> |
|
|
</a> |
|
|
</a> |
|
|
)} |
|
|
)} |
|
|
{(source === PluginSource.marketplace || source === PluginSource.github) && ( |
|
|
|
|
|
|
|
|
{(source === PluginSource.marketplace || source === PluginSource.github) && enable_marketplace && ( |
|
|
<div className='my-1 h-px bg-divider-subtle'></div> |
|
|
<div className='my-1 h-px bg-divider-subtle'></div> |
|
|
)} |
|
|
)} |
|
|
<div |
|
|
<div |