fix: add i18n key

This commit is contained in:
yessenia
2025-10-14 20:47:26 +08:00
parent 270fd9cb07
commit 4ec23eea00
7 changed files with 27 additions and 33 deletions

View File

@ -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}
>

View File

@ -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"

View File

@ -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>