diff --git a/src/api/constants.ts b/src/api/constants.ts index cbde31df..35bd89ac 100644 --- a/src/api/constants.ts +++ b/src/api/constants.ts @@ -335,6 +335,10 @@ export const actionStepOptions = [ title: i18n.global.t('actionStep.transferFile'), value: '整理文件', }, + { + title: i18n.global.t('actionStep.invokePlugin'), + value: '调用插件', + }, ] // 操作步骤字典 diff --git a/src/api/types.ts b/src/api/types.ts index 222874be..66954300 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -565,9 +565,9 @@ export interface NotExistMediaInfo { // 插件 export interface Plugin { - id?: string + id: string // 插件名称 - plugin_name?: string + plugin_name: string // 插件描述 plugin_desc?: string // 插件图标 diff --git a/src/components/workflow/AddDownloadAction.vue b/src/components/workflow/AddDownloadAction.vue index 7215f3fb..77296a93 100644 --- a/src/components/workflow/AddDownloadAction.vue +++ b/src/components/workflow/AddDownloadAction.vue @@ -32,7 +32,7 @@ async function loadDownloaderSetting() { })), ] } catch (error) { - console.error('加载下载器设置失败:', error) + console.error(error) } } @@ -69,7 +69,7 @@ onMounted(() => { @@ -80,7 +80,7 @@ onMounted(() => { storage="local" :label="t('workflow.addDownload.savePath')" clearable - placeholder="留空自动" + :placeholder="t('workflow.addDownload.savePathPlaceholder')" /> diff --git a/src/components/workflow/InvokePluginAction.vue b/src/components/workflow/InvokePluginAction.vue new file mode 100644 index 00000000..76a99af5 --- /dev/null +++ b/src/components/workflow/InvokePluginAction.vue @@ -0,0 +1,137 @@ + + diff --git a/src/layouts/components/WorkflowSidebar.vue b/src/layouts/components/WorkflowSidebar.vue index 843d43dc..f8656eca 100644 --- a/src/layouts/components/WorkflowSidebar.vue +++ b/src/layouts/components/WorkflowSidebar.vue @@ -71,6 +71,7 @@ function getActionIcon(type: string): string { 'SendEventAction': 'mdi-send-check', 'SendMessageAction': 'mdi-message-arrow-right', 'TransferFileAction': 'mdi-file-move', + 'InvokePluginAction': 'mdi-run', } return iconMap[type] || 'mdi-puzzle-outline' diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 3d96c308..b62b4226 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -71,6 +71,7 @@ export default { sendEvent: 'Send Event', sendMessage: 'Send Message', transferFile: 'Transfer File', + invokePlugin: 'Invoke Plugin', }, qualityOptions: { all: 'All', @@ -427,6 +428,8 @@ export default { forceResume: 'Force Resume', firstLastPiece: 'First Last Piece', onlyLack: 'Only Download Lack Resource', + categoryPlaceholder: 'Use comma to separate multiple', + savePathPlaceholder: 'Leave empty for auto', }, addSubscribe: { title: 'Add Subscribe', @@ -534,6 +537,14 @@ export default { exclude: 'Exclude (Keywords, Regex)', ruleGroups: 'Filter Rule Groups', }, + invokePlugin: { + title: 'Invoke Plugin', + subtitle: 'Call plugin to perform specific actions', + plugin: 'Plugin', + actionid: 'Action ID', + actionParams: 'Action Parameters', + loadPluginSettingFailed: 'Failed to load plugin settings', + }, title: 'Workflow', noWorkflow: 'No Workflow', noWorkflowDescription: 'Click the add button to create a workflow task.', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 40f72988..5700e950 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -71,6 +71,7 @@ export default { sendEvent: '发送事件', sendMessage: '发送消息', transferFile: '整理文件', + invokePlugin: '调用插件', }, qualityOptions: { all: '全部', @@ -425,6 +426,8 @@ export default { forceResume: '强制继续', firstLastPiece: '优先首尾文件', onlyLack: '仅下载缺失资源', + categoryPlaceholder: '多个使用,分隔', + savePathPlaceholder: '留空自动', }, addSubscribe: { title: '添加订阅', @@ -532,6 +535,14 @@ export default { exclude: '排除(关键字、正则式)', ruleGroups: '过滤规则组', }, + invokePlugin: { + title: '调用插件', + subtitle: '调用插件执行特定操作', + plugin: '插件', + actionid: '动作ID', + actionParams: '动作参数', + loadPluginSettingFailed: '加载插件设置失败', + }, title: '工作流', noWorkflow: '没有工作流', noWorkflowDescription: '点击添加按钮创建工作流任务。', diff --git a/src/locales/zh-TW.ts b/src/locales/zh-TW.ts index 164a1dfd..3b0762e8 100644 --- a/src/locales/zh-TW.ts +++ b/src/locales/zh-TW.ts @@ -71,6 +71,7 @@ export default { sendEvent: '發送事件', sendMessage: '發送消息', transferFile: '整理文件', + invokePlugin: '調用插件', }, qualityOptions: { all: '全部', @@ -426,6 +427,8 @@ export default { forceResume: '强制继续', firstLastPiece: '优先首尾文件', onlyLack: '仅下载缺失资源', + categoryPlaceholder: '多個使用,分隔', + savePathPlaceholder: '留空自動', }, addSubscribe: { title: '添加订阅', @@ -533,6 +536,14 @@ export default { exclude: '排除(關鍵字、正則式)', ruleGroups: '過濾規則組', }, + invokePlugin: { + title: '調用插件', + subtitle: '調用插件執行特定操作', + plugin: '插件', + actionid: '動作ID', + actionParams: '動作參數', + loadPluginSettingFailed: '加載插件設置失敗', + }, title: '工作流', noWorkflow: '沒有工作流', noWorkflowDescription: '點擊添加按鈕創建工作流任務。',