!loading && fileInput?.click()"
>
diff --git a/app/components/aigc/chat/ChatItem.vue b/app/components/aigc/chat/ChatItem.vue
deleted file mode 100644
index 9c3ba2f..0000000
--- a/app/components/aigc/chat/ChatItem.vue
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
- {{
- !!chatSession.assistant
- ? chatSession.assistant.tpl_name
- : chatSession.subject
- }}
-
-
-
-
-
-
-
-
-
-
diff --git a/app/components/aigc/chat/Message.vue b/app/components/aigc/chat/Message.vue
deleted file mode 100644
index fe7894d..0000000
--- a/app/components/aigc/chat/Message.vue
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/components/aigc/chat/NewSessionScreen.vue b/app/components/aigc/chat/NewSessionScreen.vue
deleted file mode 100644
index 97219be..0000000
--- a/app/components/aigc/chat/NewSessionScreen.vue
+++ /dev/null
@@ -1,208 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 返回
-
-
-
-
-
- 选择智能助手
-
-
- 直接开始
-
-
-
-
-
-
-
-
-
-
-
-
{{ assistant.tpl_name }}
-
- {{ assistant.des }}
-
-
-
-
-
-
-
-
-
diff --git a/app/components/aigc/drawing/OptionBlock.vue b/app/components/aigc/drawing/OptionBlock.vue
deleted file mode 100644
index 87e1259..0000000
--- a/app/components/aigc/drawing/OptionBlock.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
- {{ label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/components/aigc/drawing/ResultBlock.vue b/app/components/aigc/drawing/ResultBlock.vue
deleted file mode 100644
index 06216a7..0000000
--- a/app/components/aigc/drawing/ResultBlock.vue
+++ /dev/null
@@ -1,303 +0,0 @@
-
-
-
-
-
-
-
- {{ meta.type || 'AI 智能绘图' }}
-
-
-
-
-
-
-
-
-
-
![AI Generated]()
-
-
-
-
-
-
-
-
-
- {{ meta.modal }}
-
-
-
- {{ meta.style }}
-
-
-
- {{ meta.cost }}
-
-
-
- {{ meta.ratio }}
-
-
-
- {{ meta.id }}
-
-
-
- {{ dayjs(meta.datetime * 1000).format('YYYY-MM-DD HH:mm:ss') }}
-
-
-
-
-
-
-
diff --git a/app/components/aigc/drawing/index.d.ts b/app/components/aigc/drawing/index.d.ts
deleted file mode 100644
index 206eda9..0000000
--- a/app/components/aigc/drawing/index.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export declare interface ResultBlockMeta {
- modal?: string
- cost?: string
- ratio?: string
- id?: string
- style?: string
- datetime?: number
- type?: string
-}
diff --git a/app/components/aigc/generation/CGTaskCard.client.vue b/app/components/aigc/generation/CGTaskCard.client.vue
index 3304adf..130469c 100644
--- a/app/components/aigc/generation/CGTaskCard.client.vue
+++ b/app/components/aigc/generation/CGTaskCard.client.vue
@@ -6,7 +6,6 @@ import gsap from 'gsap'
const toast = useToast()
const loginState = useLoginState()
-const { metaSymbol } = useShortcuts()
const srtEditor = ref()
@@ -59,17 +58,17 @@ const isPreviewModalOpen = ref(false)
const stateDisplay = computed(() => {
if (props.course.progress === -1)
return {
- color: 'red',
+ color: 'error' as const,
text: '失败',
}
if (props.course.progress === 100)
return {
- color: 'green',
+ color: 'success' as const,
text: '完成',
}
return {
- color: 'blue',
- text: !!props.course.progress
+ color: 'info' as const,
+ text: props.course.progress
? `${tweenedGenerateProgress.value.toFixed(0)}%`
: '队列中',
}
@@ -108,7 +107,7 @@ const startDownload = async (url: string, filename: string) => {
toast.add({
title: '下载完成',
description: '资源下载已完成',
- color: 'green',
+ color: 'success',
icon: 'i-tabler-check',
})
})
@@ -122,7 +121,7 @@ const startDownload = async (url: string, filename: string) => {
toast.add({
title: '下载失败',
description: err.message || '下载失败,未知错误',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
})
@@ -137,7 +136,7 @@ const copyTaskId = (extraMessage?: string) => {
toast.add({
title: '复制成功',
description: '已复制任务 ID',
- color: 'green',
+ color: 'success',
icon: 'i-tabler-check',
})
}
@@ -155,7 +154,7 @@ const onCombination = async () => {
toast.add({
title: '获取字幕失败',
description: '无法获取字幕文件,请稍后重试',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
return
@@ -174,7 +173,7 @@ const onCombination = async () => {
toast.add({
title: '嵌入字幕失败',
description: err.message || '未知错误',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
combinationState.value = 0
@@ -208,7 +207,7 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
toast.add({
title: '重试已提交',
description: '已加入生成队列',
- color: 'green',
+ color: 'success',
icon: 'i-tabler-check',
})
// delete
@@ -217,7 +216,7 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
toast.add({
title: '提交重试失败',
description: res.msg || '未知错误',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
}
@@ -226,7 +225,7 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
toast.add({
title: '提交重试失败',
description: err.message || '未知错误',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
}
@@ -236,11 +235,11 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
-
+
{
/>
-
+
{{ stateDisplay.text }}
@@ -283,24 +282,24 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
-
+
{
/>
{{ course.title }}
-
+
{{ dayjs(course.create_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}
@@ -327,32 +326,15 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
-
+
-
- {
if (isFailed) {
@@ -364,15 +346,18 @@ const onRetryClick = (course: resp.gen.CourseGenItem) => {
"
/>
-
-
+
-
-
-
-
-
-
微课视频预览
-
- {{ course.title }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
微课视频预览
+
+ {{ course.title }}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
嵌入视频字幕
-
+
+
+
+
+
- {{ course.title }}
-
+
嵌入视频字幕
+
+ {{ course.title }}
+
+
+
-
-
-
-
-
-
-
- {{ step }}
-
-
-
-
- {{ step }}
-
-
-
-
+
+
+
+
+ {{ step }}
+
+
+
+
+
+
+ {{ step }}
+
+
+
+
+
{
toast.add({
title: '文件类型错误',
description: '请选择一个图片文件',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
return
@@ -82,7 +82,7 @@ const composeBackgroundVideo = async () => {
toast.add({
title: '未选择图片',
description: '请先选择一个背景图片',
- color: 'orange',
+ color: 'warning',
icon: 'i-tabler-alert-circle',
})
return
@@ -110,7 +110,7 @@ const composeBackgroundVideo = async () => {
toast.add({
title: '合成成功',
description: '背景已成功合成,可预览或下载',
- color: 'green',
+ color: 'success',
icon: 'i-tabler-check',
})
} catch (err: any) {
@@ -118,7 +118,7 @@ const composeBackgroundVideo = async () => {
toast.add({
title: '合成失败',
description: combinatorError.value,
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
} finally {
@@ -172,7 +172,7 @@ const startDownload = (url: string, filename: string) => {
toast.add({
title: '下载完成',
description: '资源下载已完成',
- color: 'green',
+ color: 'success',
icon: 'i-tabler-check',
})
})
@@ -186,7 +186,7 @@ const startDownload = (url: string, filename: string) => {
toast.add({
title: '下载失败',
description: err.message || '下载失败,未知错误',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
})
@@ -197,14 +197,14 @@ const startDownload = (url: string, filename: string) => {
-
+
-
-
+
{{ video.title || '无标题' }}
-
-
完成时间
-
+
完成时间
+
{{
video.complete_time
? dayjs(video.complete_time * 1000).format(
@@ -272,8 +272,8 @@ const startDownload = (url: string, filename: string) => {
-
-
生成耗时
-
+
生成耗时
+
{{
video.duration
? dayjs.duration(video.duration || 0).format('HH:mm:ss')
@@ -285,13 +285,13 @@ const startDownload = (url: string, filename: string) => {
class="col-span-2 cursor-pointer"
@click="isFullContentOpen = true"
>
-
驱动文本
- {{ video.content }}
+ 驱动文本
+ {{ video.content }}
@@ -299,7 +299,7 @@ const startDownload = (url: string, filename: string) => {
{{ video.digital_human_id }}
@@ -307,8 +307,8 @@ const startDownload = (url: string, filename: string) => {
{
)
"
/>
-
-
+
-
-
-
-
-
- {{ video.title || '无标题' }}
- 驱动内容
-
-
-
-
-
-
-
- {{ video.content }}
-
-
-
-
-
-
- 关闭
-
-
-
-
-
-
-
-
-
-
-
绿幕视频预览
-
+
+
+
+
+
- {{ video.title }}
-
+ {{ video.title || '无标题' }}
+ 驱动内容
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
视频背景合成
-
+
+ {{ video.content }}
+
+
+
+
+
+
- {{ video.title }}
-
+ 关闭
+
-
-
-
+
+
+
+
-
-
-
-
-
- 选择背景图片
+
+
+
+
+
+
+
绿幕视频预览
+
+ {{ video.title }}
+
+
+
+
-
-
+
+
+
+ 选择背景图片
+
+
+
+
-
-
+
+
-
-
+
+
-
-
- 已选择: {{ selectedBackgroundFile.name }}
+
+
+ 已选择: {{ selectedBackgroundFile.name }}
+
-
-
-
+
+
-
-
-
-
- {{ phaseText }}
-
-
- {{ compositingProgress }}%
-
+
+
+
+
+ {{ phaseText }}
+
+
+ {{ compositingProgress }}%
+
+
+
-
-
-
-
-
-
-
- {
- selectedBackgroundFile = null
- selectedBackgroundPreview = ''
- compositedVideoBlob = null
- combinatorError = ''
- isCombinatorLoading = false
- }
- "
- />
-
-
-
-
-
+
+
+
+ {
+ selectedBackgroundFile = null
+ selectedBackgroundPreview = ''
+ compositedVideoBlob = null
+ combinatorError = ''
+ isCombinatorLoading = false
+ }
+ "
+ />
+
+
+
+
+
+
diff --git a/app/components/aigc/generation/SRTEditor.vue b/app/components/aigc/generation/SRTEditor.vue
index 493bb5f..ac42281 100644
--- a/app/components/aigc/generation/SRTEditor.vue
+++ b/app/components/aigc/generation/SRTEditor.vue
@@ -41,7 +41,7 @@ type subtitleStyleSchema = InferType
const subtitleStyleState = reactive({
color: '#fff',
- effect: 'shadow',
+ effect: 'shadow-xs',
fontSize: 24,
bottomOffset: 12,
})
@@ -58,7 +58,7 @@ const loadSrt = async () => {
toast.add({
title: '加载字幕失败',
description: `${err}` || '未知错误',
- color: 'red',
+ color: 'error',
})
} finally {
isLoading.value = false
@@ -79,8 +79,8 @@ const parseSrt = (srt: string) => {
subtitles.value.push(subtitle)
}
subtitle = {
- start: match[1],
- end: match[2],
+ start: match[1] || '',
+ end: match[2] || '',
text: '',
}
} else if (subtitle) {
@@ -105,23 +105,23 @@ const generateSrt = () => {
const formatTime = (time: string) => {
const parts = time.split(',')
- const timeParts = parts[0].split(':')
+ const timeParts = parts[0]?.split(':') || []
return {
- hours: parseInt(timeParts[0]),
- minutes: parseInt(timeParts[1]),
- seconds: parseInt(timeParts[2]),
- milliseconds: parseInt(parts[1]),
+ hours: parseInt(timeParts[0] || '0'),
+ minutes: parseInt(timeParts[1] || '0'),
+ seconds: parseInt(timeParts[2] || '0'),
+ milliseconds: parseInt(parts[1] || '0'),
}
}
const formatTimeToDayjs = (time: string) => {
const parts = time.split(',')
- const timeParts = parts[0].split(':')
+ const timeParts = parts[0]?.split(':') || []
return dayjs()
- .hour(parseInt(timeParts[0]))
- .minute(parseInt(timeParts[1]))
- .second(parseInt(timeParts[2]))
- .millisecond(parseInt(parts[1]))
+ .hour(parseInt(timeParts[0] || '0'))
+ .minute(parseInt(timeParts[1] || '0'))
+ .second(parseInt(timeParts[2] || '0'))
+ .millisecond(parseInt(parts[1] || '0'))
}
const syncSubtitles = () => {
@@ -183,7 +183,7 @@ const saveNewSubtitle = () => {
.then((_) => {
modified.value = false
toast.add({
- color: 'green',
+ color: 'success',
title: '字幕已保存',
description: '修改后的字幕文件已保存',
})
@@ -202,7 +202,7 @@ const exportVideo = async () => {
toast.add({
title: '获取字幕失败',
description: '无法获取字幕文件,请稍后重试',
- color: 'red',
+ color: 'error',
icon: 'i-tabler-alert-triangle',
})
return
@@ -213,7 +213,7 @@ const exportVideo = async () => {
color: subtitleStyleState.color,
fontSize: subtitleStyleState.fontSize,
textShadow:
- subtitleStyleState.effect === 'shadow'
+ subtitleStyleState.effect === 'shadow-xs'
? {
offsetX: 2,
offsetY: 2,
@@ -258,346 +258,349 @@ defineExpose({
-
-
-
-
-
- 字幕编辑器
-
-
- {{ course.title }}
-
-
-
-
-
+
-
-
-