From c855cf5be71ad45c73db6a91cf5522fe2fad3267 Mon Sep 17 00:00:00 2001 From: kura Date: Tue, 28 Apr 2026 18:33:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/App.vue | 12 +- src/components/SubtitleEditor.vue | 35 ++- src/components/TaskQueue.vue | 18 +- src/style.css | 384 ++++++++++++++++++++++-------- tailwind.config.js | 12 +- 6 files changed, 331 insertions(+), 132 deletions(-) diff --git a/index.html b/index.html index a7cbc8a..f5d4a45 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ CrossSubtitle-AI - +
diff --git a/src/App.vue b/src/App.vue index 7531a9b..ef6fcb9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -240,12 +240,14 @@ async function handleExport(format: 'srt' | 'vtt' | 'ass') {
CrossSubtitle - 桌面字幕工作台 - 作者:kuraa gpt5.4 + by kuraa
+ @@ -254,7 +256,6 @@ async function handleExport(format: 'srt' | 'vtt' | 'ass') {
- 任务参数
-
- +
diff --git a/src/components/SubtitleEditor.vue b/src/components/SubtitleEditor.vue index 0a00781..2048f09 100644 --- a/src/components/SubtitleEditor.vue +++ b/src/components/SubtitleEditor.vue @@ -7,6 +7,15 @@ const props = defineProps<{ logs: string[] }>() +const isProcessing = computed(() => { + if (!props.task) return false + return !['completed', 'failed'].includes(props.task.status) +}) + +const canExport = computed(() => { + return props.task?.status === 'completed' && (props.task.segments?.length ?? 0) > 0 +}) + const emit = defineEmits<{ save: [segment: SubtitleSegment] export: [format: 'srt' | 'vtt' | 'ass'] @@ -44,19 +53,22 @@ function updateTranslatedText(segment: SubtitleSegment, value: string) { {{ task ? `${segments.length} 条片段` : '选择左侧任务后开始查看' }}

-
- - - +
+ + +
- 选择任务后显示字幕 +

选择任务后显示字幕

+

点击左侧任务列表中的任务开始查看

- 暂无字幕片段 + + +
@@ -67,13 +79,14 @@ function updateTranslatedText(segment: SubtitleSegment, value: string) { >
{{ formatTime(segment.start) }} - {{ formatTime(segment.end) }} - {{ segment.id }} + {{ segment.id }}

{{ segment.sourceText || '等待识别结果...' }}