diff --git a/components/FloatingBall.vue b/components/FloatingBall.vue index 706c45d..e66e15a 100644 --- a/components/FloatingBall.vue +++ b/components/FloatingBall.vue @@ -33,12 +33,12 @@
-
+
{{ shortcutTip }}
-
+
diff --git a/components/Main.vue b/components/Main.vue index a4f1bce..ec6e5a3 100644 --- a/components/Main.vue +++ b/components/Main.vue @@ -501,6 +501,43 @@ + + + + + 批量翻译 + + + + + + + + + + + + + + 批量翻译大小 + + + + + + +
建议范围:1024-32768字符
+
+
+ @@ -1048,6 +1085,30 @@ const handleConcurrentChange = (currentValue: number | undefined, oldValue: numb }); }; +// 处理批量翻译大小变化 +const handleBatchSizeChange = (currentValue: number | undefined, oldValue: number | undefined) => { + // 验证批量翻译大小的有效性 + if (currentValue === undefined || currentValue < 1024 || currentValue > 32768) { + ElMessage({ + message: '批量翻译大小必须在 1024-32768 字符之间', + type: 'warning', + duration: 2000 + }); + // 恢复默认值 + config.value.batchTranslationSize = 4096; + return; + } + + // 显示设置已更新的提示 + showRefreshTip.value = true; + + ElMessage({ + message: `批量翻译大小已更新为 ${currentValue} 字符`, + type: 'success', + duration: 2000 + }); +}; + // 显示刷新提示 const showRefreshTip = ref(false); @@ -1599,4 +1660,11 @@ const validateConfig = (configData: any): boolean => { margin-top: 4px; line-height: 1.4; } + +.input-hint { + color: var(--el-text-color-secondary); + font-size: 12px; + margin-top: 4px; + line-height: 1.4; +} diff --git a/components/TranslationStatus.vue b/components/TranslationStatus.vue index 3e6edb1..c4bcc27 100644 --- a/components/TranslationStatus.vue +++ b/components/TranslationStatus.vue @@ -2,20 +2,41 @@
-
翻译进度
-
×
+
翻译进度
+
×
-
-
当前活跃任务:
-
{{ status.activeTranslations }} / {{ status.maxConcurrent }}
+ +
+
+
{{ Math.round(status.progressPercentage) }}%
+
+ 剩余: {{ formatRemainingTime(realTimeRemaining) }} +
+
+
+
+
-
-
等待中的任务:
-
{{ status.pendingTranslations }}
-
-
-
+ + +
+
+
当前活跃任务:
+
{{ status.activeTranslations }} / {{ status.maxConcurrent }}
+
+
+
等待中的任务:
+
{{ status.pendingTranslations }}
+
+
+
字符进度:
+
{{ formatNumber(status.completedCharacters) }} / {{ formatNumber(status.totalCharacters) }}
+
+
+
平均速度:
+
{{ status.averageSpeed }} 字符/秒
+
@@ -23,30 +44,60 @@