diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx index 81b76539ab..814905cc3b 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx @@ -146,7 +146,7 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU triggerPopupSameWidth: buttonType === CreateButtonType.FULL_BUTTON, }} triggerProps={{ - className: cn('h-8 bg-transparent px-0 hover:bg-transparent', methodType !== DEFAULT_METHOD && 'pointer-events-none', buttonType === CreateButtonType.FULL_BUTTON && 'grow'), + className: cn('h-8 bg-transparent px-0 hover:bg-transparent', methodType !== DEFAULT_METHOD && supportedMethods.length > 1 && 'pointer-events-none', buttonType === CreateButtonType.FULL_BUTTON && 'grow'), }} popupProps={{ wrapperClassName: 'z-[1000]', diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx index 5ca2e2bb36..dc26a2a97e 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx @@ -29,24 +29,25 @@ export const SubscriptionListView: React.FC = ({ ) } + const subscriptionCount = subscriptions?.length || 0 return (
- {subscriptions?.length && ( + {subscriptionCount > 0 && (
- {t('pluginTrigger.subscription.listNum', { num: subscriptions?.length || 0 })} + {t('pluginTrigger.subscription.listNum', { num: subscriptionCount })}
)} 0 ? CreateButtonType.ICON_BUTTON : CreateButtonType.FULL_BUTTON} />
- {subscriptions?.length && ( + {subscriptionCount > 0 && (
{subscriptions?.map(subscription => (