فهرست منبع

feat(speaking): auto-open config panel after creating from card and clear default topic placeholders

- Layer2Speaking: trigger openConfigSignal after createFrameElement so left-side config opens immediately
- DialogueChatView/TopicDiscussionPreview: drop hardcoded default topic and decorative emoji placeholders

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jimmylee 2 ماه پیش
والد
کامیت
83417e436c

+ 2 - 0
src/views/Editor/EnglishSpeaking/layers/Layer2Speaking.vue

@@ -147,6 +147,8 @@ async function insertSpeakingToolToCanvas(source: 'select' | 'manual') {
   try {
     const { id } = await createSpeakingConfig(speakingStore.config)
     createFrameElement(id, 77)
+    // 创建后立即唤起左侧配置面板(与点击画布 77 型 frame 同款信号),使用户可直接编辑
+    speakingStore.openConfigPanel()
     message.success(source === 'select' ? '已添加口语练习到幻灯片' : '已添加空白口语工具,点击画布上的元素进行配置')
   } catch (err: any) {
     console.error('[speaking] create failed:', err)

+ 1 - 1
src/views/Editor/EnglishSpeaking/preview/DialogueChatView.vue

@@ -562,7 +562,7 @@ interface Props {
 }
 
 const props = withDefaults(defineProps<Props>(), {
-  topic: '我最喜欢的动物',
+  topic: '',
   keywords: () => ['animal', 'zoo', 'cute', 'favorite'],
   aiName: 'Tom',
   aiAvatar: '😊',

+ 4 - 4
src/views/Editor/EnglishSpeaking/preview/TopicDiscussionPreview.vue

@@ -4,7 +4,7 @@
     <div v-if="dialogueState === 'checking-history'" class="ready-stage">
       <div class="ready-header">
         <h1 class="ready-title">
-          <span class="ready-title-icon">💬</span>
+          <!-- <span class="ready-title-icon">💬</span> -->
           Topic Discussion
         </h1>
         <p class="ready-subtitle">正在读取你的练习记录...</p>
@@ -17,14 +17,14 @@
     <div v-else-if="dialogueState === 'ready'" class="ready-stage">
       <div class="ready-header">
         <h1 class="ready-title">
-          <span class="ready-title-icon">💬</span>
+          <!-- <span class="ready-title-icon">💬</span> -->
           Topic Discussion
         </h1>
         <p class="ready-subtitle">话题讨论 · 与 AI 伙伴练习英语对话</p>
       </div>
 
       <div class="ready-body">
-        <span class="topic-emoji">🐼</span>
+        <!-- <span class="topic-emoji">🐼</span> -->
         <h3 class="topic-name">{{ speakingStore.config.topic || topic }}</h3>
       </div>
 
@@ -100,7 +100,7 @@ interface Props {
 }
 
 const props = withDefaults(defineProps<Props>(), {
-  topic: '我最喜欢的动物',
+  topic: '',
   keywords: () => ['favorite', 'adorable', 'bamboo', 'habitat', 'wildlife', 'endangered'],
   totalRounds: 3,
   configId: '',