1、添加中英文版本
2、修复已知BUG 3、完善功能 4、添加minimax视频渠道
This commit is contained in:
@@ -262,6 +262,7 @@ import { useRouter, useRoute } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ArrowLeft, Document, User, Picture, Plus } from '@element-plus/icons-vue'
|
||||
import { dramaAPI } from '@/api/drama'
|
||||
import { characterLibraryAPI } from '@/api/character-library'
|
||||
import type { Drama } from '@/types/drama'
|
||||
import { AppHeader, StatCard, EmptyState } from '@/components/common'
|
||||
|
||||
@@ -464,29 +465,30 @@ const deleteCharacter = async (character: any) => {
|
||||
return
|
||||
}
|
||||
|
||||
await ElMessageBox.confirm(
|
||||
`确定要删除角色"${character.name}"吗?`,
|
||||
'删除确认',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
if (!character.id) {
|
||||
ElMessage.error('角色ID不存在,无法删除')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
const updatedCharacters = drama.value!.characters!.filter(c => c.id !== character.id)
|
||||
await dramaAPI.saveCharacters(drama.value!.id, updatedCharacters.map(c => ({
|
||||
name: c.name,
|
||||
role: c.role,
|
||||
appearance: c.appearance,
|
||||
personality: c.personality,
|
||||
description: c.description
|
||||
})))
|
||||
ElMessage.success('删除成功')
|
||||
await ElMessageBox.confirm(
|
||||
`确定要删除角色"${character.name}"吗?此操作不可恢复。`,
|
||||
'删除确认',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
|
||||
await characterLibraryAPI.deleteCharacter(character.id)
|
||||
ElMessage.success('角色已删除')
|
||||
await loadDramaData()
|
||||
} catch (error: any) {
|
||||
ElMessage.error(error.message || '删除失败')
|
||||
if (error !== 'cancel') {
|
||||
console.error('删除角色失败:', error)
|
||||
ElMessage.error(error.message || '删除失败')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,22 +521,30 @@ const editScene = (scene: any) => {
|
||||
}
|
||||
|
||||
const deleteScene = async (scene: any) => {
|
||||
await ElMessageBox.confirm(
|
||||
`确定要删除场景"${scene.name}"吗?`,
|
||||
'删除确认',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
if (!scene.id) {
|
||||
ElMessage.error('场景ID不存在,无法删除')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
// TODO: 调用删除API
|
||||
ElMessage.success('删除成功')
|
||||
await ElMessageBox.confirm(
|
||||
`确定要删除场景"${scene.name || scene.location}"吗?此操作不可恢复。`,
|
||||
'删除确认',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
|
||||
await dramaAPI.deleteScene(scene.id.toString())
|
||||
ElMessage.success('场景已删除')
|
||||
await loadScenes()
|
||||
} catch (error: any) {
|
||||
ElMessage.error(error.message || '删除失败')
|
||||
if (error !== 'cancel') {
|
||||
console.error('删除场景失败:', error)
|
||||
ElMessage.error(error.message || '删除失败')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -743,6 +753,10 @@ onMounted(() => {
|
||||
|
||||
.dark :deep(.el-table) {
|
||||
background: var(--bg-card);
|
||||
--el-table-bg-color: var(--bg-card);
|
||||
--el-table-tr-bg-color: var(--bg-card);
|
||||
--el-table-header-bg-color: var(--bg-secondary);
|
||||
--el-fill-color-lighter: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.dark :deep(.el-table th),
|
||||
@@ -755,6 +769,14 @@ onMounted(() => {
|
||||
border-color: var(--border-primary);
|
||||
}
|
||||
|
||||
.dark :deep(.el-table--striped .el-table__body tr.el-table__row--striped td) {
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.dark :deep(.el-table__body tr:hover > td) {
|
||||
background: var(--bg-card-hover) !important;
|
||||
}
|
||||
|
||||
.dark :deep(.el-descriptions) {
|
||||
background: var(--bg-card);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user