mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
fix: add i18n key
This commit is contained in:
@ -202,7 +202,7 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU
|
||||
onClick={onClickCreate}
|
||||
className={cn(
|
||||
'float-right',
|
||||
shape === 'circle' && '!rounded-full border-[0.5px] border-components-button-secondary-border-hover bg-components-button-secondary-bg-hover text-components-button-secondary-accent-text shadow-xs',
|
||||
shape === 'circle' && '!rounded-full border-[0.5px] border-components-button-secondary-border-hover bg-components-button-secondary-bg-hover text-components-button-secondary-accent-text shadow-xs hover:border-components-button-secondary-border-disabled hover:bg-components-button-secondary-bg-disabled hover:text-components-button-secondary-accent-text-disabled',
|
||||
)}
|
||||
state={subscriptionCount >= MAX_COUNT ? ActionButtonState.Disabled : ActionButtonState.Default}
|
||||
>
|
||||
|
||||
@ -185,12 +185,12 @@ export const OAuthClientSettingsModal = ({ oauthConfig, onClose, showOAuthCreate
|
||||
)
|
||||
}
|
||||
>
|
||||
<span className='system-sm-semibold mb-2 text-text-secondary'>OAuth Client</span>
|
||||
<div className='system-sm-medium mb-2 text-text-secondary'>{t('pluginTrigger.subscription.addType.options.oauth.clientTitle')}</div>
|
||||
<div className='mb-4 flex w-full items-start justify-between gap-2'>
|
||||
{[ClientTypeEnum.Default, ClientTypeEnum.Custom].map(option => (
|
||||
<OptionCard
|
||||
key={option}
|
||||
title={option}
|
||||
title={t(`pluginTrigger.subscription.addType.options.oauth.${option}`)}
|
||||
onSelect={() => setClientType(option)}
|
||||
selected={clientType === option}
|
||||
className="flex-1"
|
||||
|
||||
@ -31,18 +31,18 @@ const SubscriptionTriggerButton: React.FC<SubscriptionTriggerButtonProps> = ({
|
||||
if (!selectedId) {
|
||||
if (isOpen) {
|
||||
return {
|
||||
label: t('workflow.nodes.triggerPlugin.selectSubscription'),
|
||||
label: t('pluginTrigger.subscription.selectPlaceholder'),
|
||||
color: 'yellow' as const,
|
||||
}
|
||||
}
|
||||
return {
|
||||
label: 'No subscription selected',
|
||||
label: t('pluginTrigger.subscription.noSubscriptionSelected'),
|
||||
color: 'red' as const,
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
label: subscriptions?.find(sub => sub.id === selectedId)?.name || '--',
|
||||
label: subscriptions?.find(sub => sub.id === selectedId)?.name || t('pluginTrigger.subscription.selectPlaceholder'),
|
||||
color: 'green' as const,
|
||||
}
|
||||
}, [selectedId, subscriptions, t, isOpen])
|
||||
@ -57,7 +57,7 @@ const SubscriptionTriggerButton: React.FC<SubscriptionTriggerButtonProps> = ({
|
||||
)}
|
||||
onClick={onClick}
|
||||
>
|
||||
<RiWebhookLine className='h-3.5 w-3.5 shrink-0 text-text-secondary' />
|
||||
<RiWebhookLine className={cn('h-3.5 w-3.5 shrink-0 text-text-secondary', statusConfig.color === 'red' && 'text-components-button-destructive-secondary-text')} />
|
||||
<span className={cn('system-xs-medium truncate text-components-button-ghost-text', statusConfig.color === 'red' && 'text-components-button-destructive-secondary-text')}>
|
||||
{statusConfig.label}
|
||||
</span>
|
||||
@ -65,6 +65,7 @@ const SubscriptionTriggerButton: React.FC<SubscriptionTriggerButtonProps> = ({
|
||||
className={cn(
|
||||
'ml-auto h-4 w-4 shrink-0 text-text-quaternary transition-transform',
|
||||
isOpen && 'rotate-180',
|
||||
statusConfig.color === 'red' && 'text-components-button-destructive-secondary-text',
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user