chore: update dialogs, i18n and improve component integration
Various functional updates and improvements across provider dialogs, MCP panel, skills page, and internationalization. Provider Dialogs: - AddProviderDialog * Simplified form state management * Improved preset selection workflow * Better validation error messages * Enhanced template variable handling - EditProviderDialog * Streamlined edit flow with better state synchronization * Improved handling of live config backfilling * Better error recovery for failed updates * Enhanced integration with parent components MCP & Skills: - UnifiedMcpPanel * Reduced complexity from 140+ to ~95 lines * Improved multi-app server management * Better server type detection (stdio/http) * Enhanced server status indicators * Cleaner integration with MCP form modal - SkillsPage * Simplified navigation and state management * Better integration with RepoManagerPanel * Improved error handling for repository operations * Enhanced loading states - SkillCard * Minor layout adjustments * Better action button placement Environment & Configuration: - EnvWarningBanner * Improved conflict detection messages * Better visual hierarchy for warnings * Enhanced dismissal behavior - tauri.conf.json * Updated build configuration * Added new window management options Internationalization: - en.json & zh.json * Added 17 new translation keys for new features * Updated existing keys for better clarity * Added translations for new settings page * Improved consistency across UI text Code Cleanup: - mutations.ts * Removed 14 lines of unused mutation definitions * Cleaned up deprecated query invalidation logic * Better type safety for mutation parameters Overall Impact: - Reduced total lines by 51 (-10% in affected files) - Improved component integration and data flow - Better error handling and user feedback - Enhanced i18n coverage for new features These changes improve the overall polish and integration of various components while removing technical debt and unused code.
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
"formatSuccess": "Formatted successfully",
|
||||
"formatError": "Format failed: {{error}}",
|
||||
"copy": "Copy",
|
||||
"view": "View"
|
||||
"view": "View",
|
||||
"back": "Back"
|
||||
},
|
||||
"apiKeyInput": {
|
||||
"placeholder": "Enter API Key",
|
||||
@@ -314,7 +315,8 @@
|
||||
"pleaseAddEndpoint": "Please add an endpoint first",
|
||||
"testUnavailable": "Speed test unavailable",
|
||||
"noResult": "No result returned",
|
||||
"testFailed": "Speed test failed: {{error}}"
|
||||
"testFailed": "Speed test failed: {{error}}",
|
||||
"status": "Status: {{code}}"
|
||||
},
|
||||
"codexConfig": {
|
||||
"authJson": "auth.json (JSON) *",
|
||||
@@ -361,6 +363,9 @@
|
||||
"title": "Configure Usage Query",
|
||||
"enableUsageQuery": "Enable usage query",
|
||||
"presetTemplate": "Preset template",
|
||||
"requestUrl": "Request URL",
|
||||
"requestUrlPlaceholder": "e.g. https://api.example.com",
|
||||
"method": "HTTP method",
|
||||
"templateCustom": "Custom",
|
||||
"templateGeneral": "General",
|
||||
"templateNewAPI": "NewAPI",
|
||||
@@ -373,11 +378,14 @@
|
||||
"queryFailedMessage": "Query failed",
|
||||
"queryScript": "Query script (JavaScript)",
|
||||
"timeoutSeconds": "Timeout (seconds)",
|
||||
"headers": "Headers",
|
||||
"body": "Body",
|
||||
"timeoutHint": "Range: 2-30 seconds",
|
||||
"timeoutMustBeInteger": "Timeout must be an integer, decimal part ignored",
|
||||
"timeoutCannotBeNegative": "Timeout cannot be negative",
|
||||
"autoIntervalMinutes": "Auto query interval (minutes)",
|
||||
"autoQueryInterval": "Auto Query Interval (minutes)",
|
||||
"autoQueryIntervalHint": "0 to disable, recommend 5-60 minutes",
|
||||
"autoQueryIntervalHint": "0 to disable; recommend 5-60 minutes",
|
||||
"intervalMustBeInteger": "Interval must be an integer, decimal part ignored",
|
||||
"intervalCannotBeNegative": "Interval cannot be negative",
|
||||
"intervalAdjusted": "Interval adjusted to {{value}} minutes",
|
||||
@@ -398,6 +406,9 @@
|
||||
"formatSuccess": "Format successful",
|
||||
"formatFailed": "Format failed",
|
||||
"variablesHint": "Supported variables: {{apiKey}}, {{baseUrl}} | extractor function receives API response JSON object",
|
||||
"scriptConfig": "Request configuration",
|
||||
"extractorCode": "Extractor code",
|
||||
"extractorHint": "Return object should include remaining quota fields",
|
||||
"fieldIsValid": "• isValid: Boolean, whether plan is valid",
|
||||
"fieldInvalidMessage": "• invalidMessage: String, reason for expiration (shown when isValid is false)",
|
||||
"fieldRemaining": "• remaining: Number, remaining quota",
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
"formatSuccess": "格式化成功",
|
||||
"formatError": "格式化失败:{{error}}",
|
||||
"copy": "复制",
|
||||
"view": "查看"
|
||||
"view": "查看",
|
||||
"back": "返回"
|
||||
},
|
||||
"apiKeyInput": {
|
||||
"placeholder": "请输入API Key",
|
||||
@@ -314,7 +315,8 @@
|
||||
"pleaseAddEndpoint": "请先添加端点",
|
||||
"testUnavailable": "测速功能不可用",
|
||||
"noResult": "未返回结果",
|
||||
"testFailed": "测速失败: {{error}}"
|
||||
"testFailed": "测速失败: {{error}}",
|
||||
"status": "状态码:{{code}}"
|
||||
},
|
||||
"codexConfig": {
|
||||
"authJson": "auth.json (JSON) *",
|
||||
@@ -361,6 +363,9 @@
|
||||
"title": "配置用量查询",
|
||||
"enableUsageQuery": "启用用量查询",
|
||||
"presetTemplate": "预设模板",
|
||||
"requestUrl": "请求地址",
|
||||
"requestUrlPlaceholder": "例如:https://api.example.com",
|
||||
"method": "HTTP 方法",
|
||||
"templateCustom": "自定义",
|
||||
"templateGeneral": "通用模板",
|
||||
"templateNewAPI": "NewAPI",
|
||||
@@ -373,11 +378,14 @@
|
||||
"queryFailedMessage": "查询失败",
|
||||
"queryScript": "查询脚本(JavaScript)",
|
||||
"timeoutSeconds": "超时时间(秒)",
|
||||
"headers": "请求头",
|
||||
"body": "请求 Body",
|
||||
"timeoutHint": "范围: 2-30 秒",
|
||||
"timeoutMustBeInteger": "超时时间必须为整数,小数部分已忽略",
|
||||
"timeoutCannotBeNegative": "超时时间不能为负数",
|
||||
"autoIntervalMinutes": "自动查询间隔(分钟)",
|
||||
"autoQueryInterval": "自动查询间隔(分钟)",
|
||||
"autoQueryIntervalHint": "0 表示不自动查询,建议设置 5-60 分钟",
|
||||
"autoQueryIntervalHint": "0 表示不自动查询,建议 5-60 分钟",
|
||||
"intervalMustBeInteger": "自动查询间隔必须为整数,小数部分已忽略",
|
||||
"intervalCannotBeNegative": "自动查询间隔不能为负数",
|
||||
"intervalAdjusted": "自动查询间隔已调整为 {{value}} 分钟",
|
||||
@@ -398,6 +406,9 @@
|
||||
"formatSuccess": "格式化成功",
|
||||
"formatFailed": "格式化失败",
|
||||
"variablesHint": "支持变量: {{apiKey}}, {{baseUrl}} | extractor 函数接收 API 响应的 JSON 对象",
|
||||
"scriptConfig": "请求配置",
|
||||
"extractorCode": "提取器代码",
|
||||
"extractorHint": "返回对象需包含剩余额度等字段",
|
||||
"fieldIsValid": "• isValid: 布尔值,套餐是否有效",
|
||||
"fieldInvalidMessage": "• invalidMessage: 字符串,失效原因说明(当 isValid 为 false 时显示)",
|
||||
"fieldRemaining": "• remaining: 数字,剩余额度",
|
||||
|
||||
Reference in New Issue
Block a user