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 9896234c61..3cb4f93de4 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
@@ -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}
>
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx
index 9ccb8404fd..b1af8ae0e0 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx
@@ -185,12 +185,12 @@ export const OAuthClientSettingsModal = ({ oauthConfig, onClose, showOAuthCreate
)
}
>
- OAuth Client
+
{t('pluginTrigger.subscription.addType.options.oauth.clientTitle')}
{[ClientTypeEnum.Default, ClientTypeEnum.Custom].map(option => (
setClientType(option)}
selected={clientType === option}
className="flex-1"
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx
index 560ab2175e..97d6e57e94 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx
@@ -31,18 +31,18 @@ const SubscriptionTriggerButton: React.FC = ({
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 = ({
)}
onClick={onClick}
>
-
+
{statusConfig.label}
@@ -65,6 +65,7 @@ const SubscriptionTriggerButton: React.FC = ({
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',
)}
/>
diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/node-auth-factory.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/node-auth-factory.tsx
index fb296160df..9bbb7193de 100644
--- a/web/app/components/workflow/nodes/_base/components/workflow-panel/node-auth-factory.tsx
+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/node-auth-factory.tsx
@@ -37,7 +37,6 @@ const NodeAuth: FC = ({ data, onAuthorizationChange, onSubscripti
onSubscriptionChange?.(id, name)}
/>
)
diff --git a/web/app/components/workflow/nodes/trigger-plugin/components/subscription-menu.tsx b/web/app/components/workflow/nodes/trigger-plugin/components/subscription-menu.tsx
index 37abab2be8..0aa2dacdb1 100644
--- a/web/app/components/workflow/nodes/trigger-plugin/components/subscription-menu.tsx
+++ b/web/app/components/workflow/nodes/trigger-plugin/components/subscription-menu.tsx
@@ -1,23 +1,25 @@
'use client'
+import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'
import { SubscriptionSelectorEntry } from '@/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry'
import { usePluginStore } from '@/app/components/plugins/plugin-detail-panel/subscription-list/store'
import { memo, useEffect } from 'react'
import type { PluginTriggerNodeType } from '../types'
import useConfig from '../use-config'
-export const SubscriptionMenu = memo(({ payload, selectedSubscriptionId, onSubscriptionSelect }: {
+export const SubscriptionMenu = memo(({ payload, onSubscriptionSelect }: {
payload: PluginTriggerNodeType,
- selectedSubscriptionId?: string,
onSubscriptionSelect: ({ id, name }: { id: string, name: string }) => void
}) => {
// @ts-expect-error TODO: fix this
const { currentProvider } = useConfig(payload.id as string, payload)
const { setDetail } = usePluginStore()
+ const language = useLanguage()
useEffect(() => {
if (currentProvider) {
setDetail({
+ name: currentProvider.label[language],
plugin_id: currentProvider.plugin_id || '',
provider: currentProvider.name,
declaration: {
@@ -34,7 +36,7 @@ export const SubscriptionMenu = memo(({ payload, selectedSubscriptionId, onSubsc
return (
)
diff --git a/web/i18n/en-US/plugin-trigger.ts b/web/i18n/en-US/plugin-trigger.ts
index e8eebca6db..a88096798b 100644
--- a/web/i18n/en-US/plugin-trigger.ts
+++ b/web/i18n/en-US/plugin-trigger.ts
@@ -15,6 +15,8 @@ const translation = {
createSuccess: 'Subscription created successfully',
createFailed: 'Failed to create subscription',
maxCount: 'Max {{num}} subscriptions',
+ selectPlaceholder: 'Select subscription',
+ noSubscriptionSelected: 'No subscription selected',
list: {
title: 'Subscriptions',
addButton: 'Add',
@@ -62,6 +64,9 @@ const translation = {
title: 'Via OAuth',
description: 'Authorize with third-party platform to create subscription',
clientSettings: 'OAuth Client Settings',
+ clientTitle: 'OAuth Client',
+ default: 'Default',
+ custom: 'Custom',
},
manual: {
title: 'Manual Setup',
@@ -123,15 +128,6 @@ const translation = {
manual: {
title: 'Manual Setup',
description: 'Configure your webhook subscription manually',
- instruction: {
- title: 'Setup Instructions',
- step1: '1. Copy the callback URL below',
- step2: '2. Go to your third-party platform webhook settings',
- step3: '3. Add the callback URL as a webhook endpoint',
- step4: '4. Configure the events you want to receive',
- step5: '5. Test the webhook by triggering an event',
- step6: '6. Return here to verify the webhook is working and complete setup',
- },
logs: {
title: 'Request Logs',
request: 'Request',
diff --git a/web/i18n/zh-Hans/plugin-trigger.ts b/web/i18n/zh-Hans/plugin-trigger.ts
index 34e1c8bac9..8d62e4a04a 100644
--- a/web/i18n/zh-Hans/plugin-trigger.ts
+++ b/web/i18n/zh-Hans/plugin-trigger.ts
@@ -15,6 +15,8 @@ const translation = {
createSuccess: '订阅创建成功',
createFailed: '订阅创建失败',
maxCount: '最多 {{num}} 个订阅',
+ selectPlaceholder: '选择订阅',
+ noSubscriptionSelected: '未选择订阅',
list: {
title: '订阅列表',
addButton: '添加',
@@ -62,6 +64,9 @@ const translation = {
title: '通过 OAuth',
description: '与第三方平台授权以创建订阅',
clientSettings: 'OAuth 客户端设置',
+ clientTitle: 'OAuth 客户端',
+ default: '默认',
+ custom: '自定义',
},
manual: {
title: '手动设置',
@@ -92,8 +97,8 @@ const translation = {
title: '通过API密钥创建',
verify: {
title: '验证凭据',
- description: '请提供您的API凭据以验证访问权限',
- error: '凭据验证失败,请检查您的API密钥。',
+ description: '请提供您的 API 凭据以验证访问权限',
+ error: '凭据验证失败,请检查您的 API 密钥。',
success: '凭据验证成功',
},
configuration: {
@@ -102,9 +107,9 @@ const translation = {
},
},
oauth: {
- title: '通过OAuth创建',
+ title: '通过 OAuth 创建',
authorization: {
- title: 'OAuth授权',
+ title: 'OAuth 授权',
description: '授权 Dify 访问您的账户',
redirectUrl: '重定向 URL',
redirectUrlHelp: '在您的 OAuth 应用配置中使用此 URL',
@@ -123,15 +128,6 @@ const translation = {
manual: {
title: '手动设置',
description: '手动配置您的 Webhook 订阅',
- instruction: {
- title: '设置说明',
- step1: '1. 复制下方的回调URL',
- step2: '2. 前往您的第三方平台Webhook设置',
- step3: '3. 将回调URL添加为Webhook端点',
- step4: '4. 配置您想要接收的事件',
- step5: '5. 通过触发事件来测试Webhook',
- step6: '6. 返回此处验证Webhook正常工作并完成设置',
- },
logs: {
title: '请求日志',
request: '请求',