|
|
@@ -143,7 +143,8 @@
|
|
|
:aria-pressed="templateId === template.id"
|
|
|
@click="selectTemplate(template.id)"
|
|
|
>
|
|
|
- <img :src="templatePreview(template.id)" :alt="template.name" /><span>{{ template.name }}</span>
|
|
|
+ <span v-if="template.id === DEFAULT_AI_COURSEWARE_TEMPLATE_ID" class="blank-template-preview" aria-hidden="true"></span>
|
|
|
+ <img v-else :src="templatePreview(template.id)" :alt="template.name" /><span>{{ template.name }}</span>
|
|
|
</button>
|
|
|
</div>
|
|
|
</section>
|
|
|
@@ -204,7 +205,7 @@ import {
|
|
|
type AiCoursewareTaskInfo,
|
|
|
type AiCoursewareGenerateResult
|
|
|
} from "@/api/aiCourseware"
|
|
|
-import { AI_COURSEWARE_TEMPLATES, recommendAiCoursewareTemplate, getAiCoursewareTemplate } from "@/config/aiCoursewareTemplates"
|
|
|
+import { AI_COURSEWARE_TEMPLATES, DEFAULT_AI_COURSEWARE_TEMPLATE_ID, getAiCoursewareTemplate } from "@/config/aiCoursewareTemplates"
|
|
|
import { aiCoursewareToSlides } from "@/utils/aiCoursewareToSlides"
|
|
|
import { getAiPptImageAspectRatios } from "@/utils/aiPptTemplateEngine"
|
|
|
import { inspectAiPptQuality, type AiPptQualityIssue } from "@/utils/aiPptQuality"
|
|
|
@@ -243,13 +244,13 @@ const expandedPage = ref(""),
|
|
|
const settingsSignature = () => JSON.stringify([preferences, extraPrompt.value, pageRange.value])
|
|
|
const settingsChanged = computed(() => !!outline.value && outlineSettings.value !== settingsSignature())
|
|
|
const templatePreview = (id: string) => templateAssetPath(id, getAiCoursewareTemplate(id).backgroundFiles[0])
|
|
|
-const steps = ["设置需求", "确认大纲", "生成课件", "编辑课件", "保存课件"]
|
|
|
+const steps = ["设置需求", "确认大纲", "生成课件"]
|
|
|
const step = ref(1),
|
|
|
outline = ref<AiCoursewareOutline>(),
|
|
|
pages = ref<EditableOutlinePage[]>([])
|
|
|
const extraPrompt = ref(""),
|
|
|
pageRange = ref("9-12"),
|
|
|
- templateId = ref("")
|
|
|
+ templateId = ref(DEFAULT_AI_COURSEWARE_TEMPLATE_ID)
|
|
|
const outlineLoading = ref(false),
|
|
|
transferring = ref(false),
|
|
|
setupError = ref(""),
|
|
|
@@ -384,7 +385,7 @@ async function restore() {
|
|
|
function loadOutline(value: AiCoursewareOutline) {
|
|
|
outline.value = clone(value)
|
|
|
pages.value = editableOutlinePages(value)
|
|
|
- templateId.value = value.templateId || recommendAiCoursewareTemplate(value).id
|
|
|
+ templateId.value = value.templateId || DEFAULT_AI_COURSEWARE_TEMPLATE_ID
|
|
|
validationErrors.value = []
|
|
|
expandedPage.value = ""
|
|
|
outlineSettings.value = settingsSignature()
|
|
|
@@ -1025,13 +1026,18 @@ footer > div {
|
|
|
.template-options .selected {
|
|
|
border-color: #1989fa;
|
|
|
}
|
|
|
-.template-options img {
|
|
|
+.template-options img,
|
|
|
+.blank-template-preview {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
aspect-ratio: 16/9;
|
|
|
object-fit: cover;
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
+.blank-template-preview {
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: inset 0 0 0 1px #e5e7eb;
|
|
|
+}
|
|
|
@media (max-width: 740px) {
|
|
|
.page-heading {
|
|
|
flex-wrap: wrap;
|