Skip to content

🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"

TypeScript

feat(ui): 应用内引导 + 语言统一切换 + 设置页布局修正

Connorb0139b7c6c0e
diff --git a/frontend/app/app.vue b/frontend/app/app.vue
index c232a12..92ef763 100644
--- a/frontend/app/app.vue
+++ b/frontend/app/app.vue
@@ -55,4 +55,57 @@ onMounted(() => {
<style>
@import url('./assets/studio.css');
+
+/* === 应用内引导(driver.js)主题覆写 — 跟随设计 token === */
+.huobao-tour-popover {
+ background: var(--surface-raised) !important;
+ color: var(--text-1) !important;
+ border: 1px solid var(--border) !important;
+ border-radius: var(--radius-lg) !important;
+ box-shadow: var(--shadow-elevated) !important;
+ max-width: 340px;
+}
+.huobao-tour-popover .driver-popover-title {
+ color: var(--text-0) !important;
+ font: 700 14px/1.3 var(--font-body) !important;
+ letter-spacing: -0.01em;
+}
+.huobao-tour-popover .driver-popover-description {
+ color: var(--text-2) !important;
+ font: 400 12.5px/1.65 var(--font-body) !important;
+}
+.huobao-tour-popover .driver-popover-progress-text {
+ color: var(--text-3) !important;
+ font-size: 10.5px !important;
+}
+.huobao-tour-popover .driver-popover-close-btn {
+ color: var(--text-3) !important;
+}
+.huobao-tour-popover .driver-popover-navigation-btns {
+ gap: 6px;
+}
+.huobao-tour-popover .driver-popover-navigation-btns button {
+ background: var(--button-bg) !important;
+ color: var(--button-text) !important;
+ border: none !important;
+ border-radius: var(--radius-pill) !important;
+ padding: 5px 14px !important;
+ font: 600 12px var(--font-body) !important;
+ text-shadow: none !important;
+ cursor: pointer;
+}
+.huobao-tour-popover .driver-popover-navigation-btns button.driver-popover-next-btn,
+.huobao-tour-popover .driver-popover-navigation-btns button.driver-popover-done-btn {
+ background: var(--accent-gradient) !important;
+ color: var(--on-accent) !important;
+}
+.driver-overlay {
+ background: var(--scrim) !important;
+ backdrop-filter: blur(2px);
+}
+/* 高亮框描边用品牌橙 */
+.driver-active-element .driver-popover-arrow svg path,
+.driver-active-element .driver-popover-arrow svg polygon {
+ fill: var(--accent) !important;
+}
</style>
diff --git a/frontend/app/components/LanguageSwitchDialog.vue b/frontend/app/components/LanguageSwitchDialog.vue
new file mode 100644
index 0000000..f59afb2
--- /dev/null
+++ b/frontend/app/components/LanguageSwitchDialog.vue
@@ -0,0 +1,100 @@
+<template>
+ <Teleport to="body">
+ <div v-if="open" class="overlay" @click.self="emit('cancel')">
+ <div class="dialog lang-switch-dialog" role="alertdialog" aria-modal="true" :aria-label="title">
+ <div class="confirm-icon lang-switch-icon">
+ <Languages :size="20" :stroke-width="1.8" />
+ </div>
+ <h2 class="confirm-title">{{ title }}</h2>
+ <p class="confirm-message">{{ message }}</p>
+ <ul class="lang-switch-effects">
+ <li>{{ t('components.langSwitch.effectUi') }}</li>
+ <li>{{ t('components.langSwitch.effectAi') }}</li>
+ <li>{{ t('components.langSwitch.effectRefresh') }}</li>
+ </ul>
+ <div class="confirm-actions">
+ <button type="button" class="btn" @click="emit('cancel')">{{ t('common.cancel') }}</button>
+ <button type="button" class="btn btn-primary" @click="emit('confirm')">
+ {{ t('components.langSwitch.confirm') }}
+ </button>
+ </div>
+ </div>
+ </div>
+ </Teleport>
+</template>
+
+<script setup>
+import { Languages } from 'lucide-vue-next'
+import { useI18n } from 'vue-i18n'
+
+const { t } = useI18n()
+
+defineProps({
+ open: { type: Boolean, default: false },
+ title: { type: String, required: true },
+ message: { type: String, required: true },
+})
+
+const emit = defineEmits(['confirm', 'cancel'])
+</script>
+
+<style scoped>
+/* 与 ConfirmDialog 同构的居中弹窗(其为 scoped 样式,这里自带全套) */
+.lang-switch-dialog {
+ width: 420px;
+ max-width: calc(100vw - 48px);
+ padding: 28px 24px 20px;
+ align-items: center;
+ text-align: center;
+}
+.confirm-icon {
+ width: 52px;
+ height: 52px;
+ border-radius: 50%;
+ background: var(--action-danger-bg);
+ color: var(--action-danger);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 14px;
+}
+.lang-switch-icon {
+ background: var(--accent-bg);
+ color: var(--accent-text);
+}
+.confirm-title {
+ font-size: 16px;
+ font-weight: 700;
+ letter-spacing: -0.01em;
+ color: var(--text-0);
+}
+.confirm-message {
+ margin-top: 8px;
+ font-size: 13px;
+ line-height: 1.65;
+ color: var(--text-2);
+ max-width: 340px;
+ word-break: break-word;
+}
+.lang-switch-effects {
+ margin: 10px 0 2px;
+ padding-left: 18px;
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ font-size: 12.5px;
+ color: var(--text-2);
+ line-height: 1.5;
+ text-align: left;
+}
+.lang-switch-effects li::marker {
+ color: var(--accent);
+}
+.confirm-actions {
+ display: flex;
+ gap: 10px;
+ width: 100%;
+ margin-top: 22px;
+}
+.confirm-actions .btn { flex: 1; }
+</style>
diff --git a/frontend/app/components/LocaleSwitcher.vue b/frontend/app/components/LocaleSwitcher.vue
index 7830e78..e290c03 100644
--- a/frontend/app/components/LocaleSwitcher.vue
+++ b/frontend/app/components/LocaleSwitcher.vue
@@ -24,7 +24,8 @@
import { ref, computed } from 'vue'
import { Languages } from 'lucide-vue-next'
import { useI18n } from 'vue-i18n'
-import { UI_LOCALES, setUiLocale } from '~/composables/i18n'
+import { UI_LOCALES } from '~/composables/i18n'
+import { confirmUnifiedLanguage } from '~/composables/useUnifiedLanguage'
const { t, locale } = useI18n()
@@ -33,7 +34,8 @@ const open = ref(false)
const currentLabel = computed(() => UI_LOCALES.find(l => l.value === locale.value)?.label || locale.value)
function select(l) {
- setUiLocale(l)
+ // UI 语言 = AI 内容语言:确认弹窗 → 统一切换 → 刷新界面
+ void confirmUnifiedLanguage(l)
open.value = false
}
</script>
diff --git a/frontend/app/composables/useTour.ts b/frontend/app/composables/useTour.ts
new file mode 100644
index 0000000..0db85df
--- /dev/null
+++ b/frontend/app/composables/useTour.ts
@@ -0,0 +1,74 @@
+/**
+ * 应用内引导漫游(driver.js)— 轻量方案
+ *
+ * - 各页面定义步骤(selector + i18n 文案 key),经 startTour() 启动
+ * - 「看过」标记按 tour id 存 localStorage(huobao:tours),首次自动弹、
+ * 帮助按钮随时重看;跳过/完成都算看过
+ * - 主题样式沿用设计 token(火焰橙 accent),见 app.vue 内 .driver-theme 覆写
+ */
+import { driver } from 'driver.js'
+import 'driver.js/dist/driver.css'
+
+const SEEN_KEY = 'huobao:tours'
+
+function readSeen(): string[] {
+ try { return JSON.parse(localStorage.getItem(SEEN_KEY) || '[]') } catch { return [] }
+}
+
+export function tourSeen(id: string): boolean {
+ return readSeen().includes(id)
+}
+
+export function markTourSeen(id: string) {
+ const seen = readSeen()
+ if (!seen.includes(id)) {
+ seen.push(id)
+ localStorage.setItem(SEEN_KEY, JSON.stringify(seen))
+ }
+}
+
+export interface TourStep {
+ element: string // CSS selector;'#__nuxt' 等兜底表示居中弹窗(无高亮)
+ titleKey: string // i18n key
+ descKey: string // i18n key
+ popoverSide?: 'top' | 'bottom' | 'left' | 'right'
+ popoverAlign?: 'start' | 'center' | 'end'
+}
+
+/**
+ * 启动一段引导。t 为 useI18n 的翻译函数。
+ * 返回是否真正启动(元素缺失或步骤为空时静默跳过)。
+ */
+export function startTour(id: string, steps: TourStep[], t: (key: string) => string): boolean {
+ const usable = steps.filter(s => s.element === '#__nuxt' || document.querySelector(s.element))
+ if (!usable.length) return false
+
+ const drv = driver({
+ showProgress: true,
+ allowClose: true,
+ overlayClickBehavior: 'nextStep',
+ popoverClass: 'huobao-tour-popover',
+ progressText: '{{current}} / {{total}}',
+ nextBtnText: t('tour.next'),
+ prevBtnText: t('tour.prev'),
+ doneBtnText: t('tour.done'),
+ onDestroyed: () => markTourSeen(id),
+ steps: usable.map(s => ({
+ element: s.element,
+ popover: {
+ title: t(s.titleKey),
+ description: t(s.descKey),
+ side: s.popoverSide || 'bottom',
+ align: s.popoverAlign || 'start',
+ },
+ })),
+ })
+ drv.drive()
+ return true
+}
+
+/** 首次进入自动引导:看过或元素未就绪则跳过 */
+export function autoTour(id: string, steps: TourStep[], t: (key: string) => string) {
+ if (tourSeen(id)) return
+ startTour(id, steps, t)
+}
diff --git a/frontend/app/composables/useUnifiedLanguage.ts b/frontend/app/composables/useUnifiedLanguage.ts
new file mode 100644
index 0000000..db75ac9
--- /dev/null
+++ b/frontend/app/composables/useUnifiedLanguage.ts
@@ -0,0 +1,74 @@
+/**
+ * 统一语言切换:UI 语言 = AI 内容语言,同一个开关。
+ *
+ * 两处入口(顶栏 LocaleSwitcher / 设置页通用 tab)都走 confirmUnifiedLanguage:
+ * 1. 弹独立确认弹窗(挂 body,说明影响:界面 + AI 内容 + 刷新)
+ * 2. 确认后:写后端 content_language → 切 vue-i18n locale → 短暂提示 → location.reload()
+ * (整页重载让所有组件干净重建,避免深嵌组件依赖 watch 的时序问题)
+ */
+import { createApp, h, ref } from 'vue'
+import { i18n, setUiLocale, type UiLocale } from '~/composables/i18n'
+import { settingsAPI } from '~/composables/useApi'
+import LanguageSwitchDialog from '~/components/LanguageSwitchDialog.vue'
+
+let pending: { resolve: (ok: boolean) => void } | null = null
+
+/** 弹确认框;resolve(true) = 用户确认切换 */
+function confirmDialog(lang: UiLocale): Promise<boolean> {
+ return new Promise((resolve) => {
+ const langNameKeys = { zh: 'langNameZh', en: 'langNameEn', ja: 'langNameJa', ko: 'langNameKo' }
+ const nameKey = `settings.general.${langNameKeys[lang] || 'langNameZh'}`
+ const title = i18n.global.t('components.langSwitch.title', { lang: i18n.global.t(nameKey) })
+ const message = i18n.global.t('components.langSwitch.message')
+
+ const open = ref(true)
+ const host = document.createElement('div')
+ document.body.appendChild(host)
+ const app = createApp({
+ setup: () => () => h(LanguageSwitchDialog, {
+ open: open.value,
+ title,
+ message,
+ onConfirm: () => { open.value = false },
+ onCancel: () => { open.value = false },
+ }),
+ })
+ app.use(i18n as unknown as Parameters<typeof app.use>[0])
+ app.mount(host)
+
+ pending = {
+ resolve: (ok) => {
+ app.unmount()
+ host.remove()
+ resolve(ok)
+ },
+ }
+ // open 置 false 后由 watch 关闭并 resolve —— 用简单轮询代替(弹窗体积小,不值得引 watch 复杂度)
+ const timer = setInterval(() => {
+ if (!open.value) {
+ clearInterval(timer)
+ pending?.resolve(true)
+ pending = null
+ }
+ }, 80)
+ })
+}
+
+let switching = false
+
+/** 入口:先弹确认框,确认后执行统一切换并刷新 */
+export async function confirmUnifiedLanguage(lang: UiLocale) {
+ if (switching) return
+ const ok = await confirmDialog(lang)
+ if (!ok) return
+ switching = true
+ try {
+ await settingsAPI.setContentLanguage(lang)
+ } catch { /* 后端失败不阻断界面切换 */ }
+ setUiLocale(lang)
+ try {
+ const { toast } = await import('vue-sonner')
+ toast.info(i18n.global.t('components.langSwitch.refreshing'), { duration: 1200 })
+ } catch { /* 提示失败不阻断 */ }
+ setTimeout(() => location.reload(), 1000)
+}
diff --git a/frontend/app/locales/en.json b/frontend/app/locales/en.json
index 9f29e6f..97c2da4 100644
--- a/frontend/app/locales/en.json
+++ b/frontend/app/locales/en.json
@@ -76,6 +76,15 @@
},
"localeSwitcher": {
"label": "Switch UI language"
+ },
+ "langSwitch": {
+ "title": "Switch language to {lang}?",
+ "message": "The UI language and AI content language will switch together.",
+ "effectUi": "All interface texts switch to this language",
+ "effectAi": "AI output (script rewriting, asset extraction, storyboard, prompts) uses this language, with matching agent prompts/skills",
+ "effectRefresh": "The page refreshes automatically after confirming",
+ "confirm": "Switch & Refresh",
+ "refreshing": "Language switched, refreshing…"
}
},
"composables": {
@@ -235,12 +244,12 @@
},
"general": {
"title": "General",
- "desc": "App-wide general settings. AI content language and UI language are independent.",
+ "desc": "App-level settings. Language switching applies to both the UI and AI-generated content.",
"contentLanguage": "AI Content Language",
- "contentLanguageSub": "The language used for AI outputs: script rewriting, asset extraction, storyboards and prompts",
- "languageLabel": "Target language",
- "languageNote": "Only affects newly generated content; existing content is not translated",
- "languageHint": "Independent from UI language. Existing asset names used in {'@'}mentions keep their original form; new content is produced in the selected language.",
+ "contentLanguageSub": "Language used by both the UI and AI output (script/assets/storyboard/prompts)",
+ "languageLabel": "Language",
+ "languageNote": "Switching updates UI and AI content language together, with an automatic refresh",
+ "languageHint": "Both entry points (top-bar button / here) are equivalent and apply globally.",
"languageSaved": "Content language saved",
"appearance": "Appearance",
"appearanceSub": "Interface color theme, applied instantly",
@@ -248,7 +257,13 @@
"appearanceNote": "In System mode, follows your OS appearance automatically",
"appearanceLight": "Light",
"appearanceDark": "Dark",
- "appearanceSystem": "System"
+ "appearanceSystem": "System",
+ "languageSavedWith": "AI content language switched to {lang} — future generations (script/assets/storyboard/prompts) will use it",
+ "langNameZh": "Chinese",
+ "langNameEn": "English",
+ "langNameJa": "Japanese",
+ "langNameKo": "Korean",
+ "unifiedSwitchWarning": "Switched to {lang} — UI and AI content language update together. Refreshing…"
},
"ai": {
"title": "AI Service Configs",
@@ -347,7 +362,7 @@
"storyboardBreaker": "Storyboard Breaker",
"promptGenerator": "Prompt Generator",
"langFallback": "Falls back to Chinese",
- "langPickerTitle": "Choose the language version to edit (loaded by AI content language at generation time)"
+ "followContentLang": "Editing language: {lang} (switch in General → AI Content Language)"
},
"skills": {
"agentList": "Agents",
@@ -851,5 +866,57 @@
"moderation": "Content was blocked by moderation. Adjust the prompt or switch models and retry.",
"requestFailed": "Request failed ({status})",
"unknown": "Operation failed. Please try again."
+ },
+ "tour": {
+ "next": "Next",
+ "prev": "Back",
+ "done": "Done",
+ "helpTitle": "Guide",
+ "index": {
+ "welcome": {
+ "title": "👋 Welcome to Huobao Drama",
+ "desc": "Novel → script → assets → storyboard → video → final cut, all in one place. Configure AI services first, then create your first project."
+ },
+ "create": {
+ "title": "Step 2 · Create a project",
+ "desc": "Click \"New Project\": name it, pick an aspect ratio (landscape/portrait) and a visual style."
+ },
+ "settings": {
+ "title": "Step 1 · Configure AI services",
+ "desc": "Every AI feature needs this first. Open Settings and paste a Huobao API Key to set up text/image/video in one click."
+ }
+ },
+ "settings": {
+ "quick": {
+ "title": "Fastest setup: Quick Setup",
+ "desc": "Paste a Huobao API Key to write the three recommended configs (text/image/video) at once, with connectivity testing."
+ },
+ "nav": {
+ "title": "Everything lives here",
+ "desc": "Switch sections on the left: AI services, general (UI & content language), style presets, agent prompts & skills, storage, about."
+ }
+ },
+ "episode": {
+ "topbar": {
+ "title": "Top bar: models & status",
+ "desc": "Switch the text/image/video model for this session any time; resolution and duration tiers follow the model."
+ },
+ "script": {
+ "title": "Step 1 · Script",
+ "desc": "(Prerequisite: AI services configured in Settings.) Paste the source novel and run \"AI Rewrite\" to get a shooting script."
+ },
+ "assets": {
+ "title": "Step 2 · Assets",
+ "desc": "Extract characters/scenes/props and generate consistent reference images, injected as reference material for videos."
+ },
+ "videos": {
+ "title": "Step 3 · Video production",
+ "desc": "Break down the storyboard → review prompts → batch-generate videos; retry failures in one click. Then merge & export."
+ },
+ "help": {
+ "title": "Replay anytime",
+ "desc": "Click this \"?\" button to replay this page's guide. Happy creating!"
+ }
+ }
}
}
diff --git a/frontend/app/locales/ja.json b/frontend/app/locales/ja.json
index 07e0ebc..58cc3c7 100644
--- a/frontend/app/locales/ja.json
+++ b/frontend/app/locales/ja.json
@@ -76,6 +76,15 @@
},
"localeSwitcher": {
"label": "表示言語を切り替え"
+ },
+ "langSwitch": {
+ "title": "言語を {lang} に切替しますか?",
+ "message": "UI 言語と AI コンテンツ言語が同期して切り替わります。",
+ "effectUi": "画面表示がすべてこの言語に切り替わります",
+ "effectAi": "脚本リライト・アセット抽出・絵コンテ・プロンプトなどの AI 生成がこの言語になります(Agent プロンプト/スキルも同期)",
+ "effectRefresh": "確認すると画面が自動で再読み込みされます",
+ "confirm": "切替して再読み込み",
+ "refreshing": "言語を切替しました。再読み込み中…"
}
},
"composables": {
@@ -235,12 +244,12 @@
},
"general": {
"title": "一般",
- "desc": "アプリ全体の一般設定。AI コンテンツ言語と表示言語は互いに独立しています。",
+ "desc": "アプリ全体の設定。言語切替は UI と AI 生成コンテンツの両方に適用されます。",
"contentLanguage": "AI コンテンツ言語",
- "contentLanguageSub": "脚本リライト、資産抽出、分镜、プロンプトなど AI 出力で統一して使用する言語",
- "languageLabel": "対象言語",
- "languageNote": "新しく生成される内容にのみ影響し、既存の内容は翻訳されません",
- "languageHint": "表示言語とは独立しています。既存資産の「{'@'}参照」名は原名のまま保持され、新しい内容は選択した言語で生成されます。",
+ "contentLanguageSub": "UI と AI 生成(脚本/アセット/絵コンテ/プロンプト)共通の言語",
+ "languageLabel": "言語",
+ "languageNote": "切替すると UI と AI コンテンツ言語が同期し、自動で再読み込みされます",
+ "languageHint": "入口は 2 か所(上部バーの言語ボタン / ここ)どちらも等価で、全体に適用されます。",
"languageSaved": "コンテンツ言語を保存しました",
"appearance": "外観",
"appearanceSub": "画面のカラーテーマ。即時反映されます",
@@ -248,7 +257,13 @@
"appearanceNote": "「システム」ではOSの外観に自動で追従します",
"appearanceLight": "ライト",
"appearanceDark": "ダーク",
- "appearanceSystem": "システム"
+ "appearanceSystem": "システム",
+ "languageSavedWith": "AI コンテンツ言語を {lang} に切替しました。以後の生成(脚本/アセット/絵コンテ/プロンプト)に適用されます",
+ "langNameZh": "中国語",
+ "langNameEn": "英語",
+ "langNameJa": "日本語",
+ "langNameKo": "韓国語",
+ "unifiedSwitchWarning": "{lang} に切替しました。UI と AI コンテンツ言語が同期され、まもなく再読み込みします…"
},
"ai": {
"title": "AI サービス設定",
@@ -347,7 +362,7 @@
"storyboardBreaker": "分镜分解",
"promptGenerator": "プロンプト生成",
"langFallback": "中国語にフォールバック",
- "langPickerTitle": "編集する言語バージョンを選択(生成時は AI コンテンツ言語で読み込み)"
+ "followContentLang": "編集言語:{lang}(「一般 → AI コンテンツ言語」で切替)"
},
"skills": {
"agentList": "Agent 一覧",
@@ -851,5 +866,57 @@
"moderation": "コンテンツが審査を通過しませんでした。プロンプトを調整するかモデルを切り替えて再試行してください",
"requestFailed": "リクエストに失敗しました({status})",
"unknown": "操作に失敗しました。再試行してください"
+ },
+ "tour": {
+ "next": "次へ",
+ "prev": "戻る",
+ "done": "完了",
+ "helpTitle": "ガイド",
+ "index": {
+ "welcome": {
+ "title": "👋 火宝短劇へようこそ",
+ "desc": "小説 → 脚本 → アセット → 絵コンテ → 動画 → 完成、すべてワンストップ。まず AI サービスを設定し、最初のプロジェクトを作成しましょう。"
+ },
+ "create": {
+ "title": "ステップ 2 · プロジェクト作成",
+ "desc": "「新規プロジェクト」で作品名・アスペクト比(縦横)・作画スタイルを選択します。"
+ },
+ "settings": {
+ "title": "ステップ 1 · AI サービスを設定",
+ "desc": "すべての AI 機能に事前設定が必要です。「設定」ページで Huobao API キーを貼り、テキスト/画像/動画をワンクリック設定しましょう。"
+ }
+ },
+ "settings": {
+ "quick": {
+ "title": "最速セットアップ:クイック設定",
+ "desc": "Huobao API キーを貼り付けると推奨 3 設定(テキスト/画像/動画)を一括書き込み。接続テスト対応。"
+ },
+ "nav": {
+ "title": "すべてここに",
+ "desc": "左でセクション切替:AI サービス、一般(UI と生成言語)、スタイルプリセット、Agent プロンプトとスキル、ストレージ、About。"
+ }
+ },
+ "episode": {
+ "topbar": {
+ "title": "上部バー:モデルと状態",
+ "desc": "テキスト/画像/動画モデルをいつでも切替。解像度と尺はモデルに連動します。"
+ },
+ "script": {
+ "title": "ステップ 1 · 脚本",
+ "desc": "(前提:設定ページで AI サービス設定済み)原文を貼り付けて「AI リライト」で撮影用脚本を生成します。"
+ },
+ "assets": {
+ "title": "ステップ 2 · アセット",
+ "desc": "キャラ/シーン/小道具を抽出し一貫性のある参照画像を生成。動画生成時の参照素材になります。"
+ },
+ "videos": {
+ "title": "ステップ 3 · 動画制作",
+ "desc": "絵コンテ分割 → プロンプト確認 → 一括動画生成。失敗はワンクリック再試行。完了後「連結・書き出し」へ。"
+ },
+ "help": {
+ "title": "いつでも再再生",
+ "desc": "この「?」ボタンでこのページのガイドを再表示できます。良い制作を!"
+ }
+ }
}
}
diff --git a/frontend/app/locales/ko.json b/frontend/app/locales/ko.json
index 7ff55df..bbb39e8 100644
--- a/frontend/app/locales/ko.json
+++ b/frontend/app/locales/ko.json
@@ -76,6 +76,15 @@
},
"localeSwitcher": {
"label": "UI 언어 전환"
+ },
+ "langSwitch": {
+ "title": "언어를 {lang}(으)로 전환할까요?",
+ "message": "UI 언어와 AI 콘텐츠 언어가 함께 전환됩니다.",
+ "effectUi": "화면 표시가 모두 해당 언어로 전환됩니다",
+ "effectAi": "대본 재작성, 에셋 추출, 스토리보드, 프롬프트 등 AI 생성물이 해당 언어로 변경됩니다(Agent 프롬프트/스킬 동기화)",
+ "effectRefresh": "확인하면 화면이 자동으로 새로고침됩니다",
+ "confirm": "전환 및 새로고침",
+ "refreshing": "언어가 전환되었습니다. 새로고침 중…"
}
},
"composables": {
@@ -235,12 +244,12 @@
},
"general": {
"title": "일반",
- "desc": "앱 전체의 일반 설정입니다. AI 콘텐츠 언어와 UI 언어는 서로 독립적입니다.",
+ "desc": "앱 전체 설정. 언어 전환은 UI와 AI 생성 콘텐츠 모두에 적용됩니다.",
"contentLanguage": "AI 콘텐츠 언어",
- "contentLanguageSub": "대본 재작성, 에셋 추출, 스토리보드, 프롬프트 등 AI 결과물에 통일해 사용하는 언어",
- "languageLabel": "대상 언어",
- "languageNote": "새로 생성되는 콘텐츠에만 영향을 미치며, 기존 콘텐츠는 번역되지 않습니다",
- "languageHint": "UI 언어와는 독립적입니다. 기존 에셋의 「{'@'}참조」 이름은 원래 이름을 유지하고, 새 콘텐츠는 선택한 언어로 생성됩니다.",
+ "contentLanguageSub": "UI와 AI 생성(대본/에셋/스토리보드/프롬프트)에 공통으로 사용되는 언어",
+ "languageLabel": "언어",
+ "languageNote": "전환 시 UI와 AI 콘텐츠 언어가 함께 변경되고 자동으로 새로고침됩니다",
+ "languageHint": "두 진입점(상단 바 언어 버튼 / 여기)은 동일하게 전역 적용됩니다.",
"languageSaved": "콘텐츠 언어가 저장되었습니다",
"appearance": "화면 모드",
"appearanceSub": "인터페이스 색상 테마, 즉시 적용됩니다",
@@ -248,7 +257,13 @@
"appearanceNote": "시스템 모드에서는 OS 화면 설정을 자동으로 따릅니다",
"appearanceLight": "라이트",
"appearanceDark": "다크",
- "appearanceSystem": "시스템"
+ "appearanceSystem": "시스템",
+ "languageSavedWith": "AI 콘텐츠 언어가 {lang}(으)로 전환되었습니다. 이후 생성(대본/에셋/스토리보드/프롬프트)에 적용됩니다",
+ "langNameZh": "중국어",
+ "langNameEn": "영어",
+ "langNameJa": "일본어",
+ "langNameKo": "한국어",
+ "unifiedSwitchWarning": "{lang}(으)로 전환되었습니다. UI와 AI 콘텐츠 언어가 함께 변경되며 곧 새로고침됩니다…"
},
"ai": {
"title": "AI 서비스 설정",
@@ -347,7 +362,7 @@
"storyboardBreaker": "스토리보드 분해",
"promptGenerator": "프롬프트 생성",
"langFallback": "중국어로 폴백",
- "langPickerTitle": "편집할 언어 버전 선택 (생성 시 AI 콘텐츠 언어로 로드)"
+ "followContentLang": "편집 언어: {lang} (일반 → AI 콘텐츠 언어에서 전환)"
},
"skills": {
"agentList": "Agent 목록",
@@ -851,5 +866,57 @@
"moderation": "콘텐츠가 심사를 통과하지 못했습니다. 프롬프트를 조정하거나 모델을 변경해 다시 시도하세요",
"requestFailed": "요청 실패({status})",
"unknown": "작업에 실패했습니다. 다시 시도하세요"
+ },
+ "tour": {
+ "next": "다음",
+ "prev": "이전",
+ "done": "완료",
+ "helpTitle": "가이드",
+ "index": {
+ "welcome": {
+ "title": "👋 휘바오 숏드라마에 오신 것을 환영합니다",
+ "desc": "소설 → 대본 → 에셋 → 스토리보드 → 영상 → 완성, 모두 한곳에서. 먼저 AI 서비스를 설정하고 첫 프로젝트를 만들어 보세요."
+ },
+ "create": {
+ "title": "2단계 · 프로젝트 생성",
+ "desc": "\"새 프로젝트\"에서 작품명, 화면 비율(가로/세로), 화풍을 선택합니다."
+ },
+ "settings": {
+ "title": "1단계 · AI 서비스 설정",
+ "desc": "모든 AI 기능에 사전 설정이 필요합니다. 설정 페이지에서 Huobao API 키를 붙여넣어 텍스트/이미지/영상을 한 번에 설정하세요."
+ }
+ },
+ "settings": {
+ "quick": {
+ "title": "가장 빠른 설정: 빠른 설정",
+ "desc": "Huobao API 키를 붙여넣으면 추천 설정 3종(텍스트/이미지/영상)을 한 번에 등록합니다. 연결 테스트 지원."
+ },
+ "nav": {
+ "title": "모든 설정이 여기에",
+ "desc": "왼쪽에서 섹션 전환: AI 서비스, 일반(UI·생성 언어), 스타일 프리셋, Agent 프롬프트와 스킬, 저장소, 정보."
+ }
+ },
+ "episode": {
+ "topbar": {
+ "title": "상단 바: 모델과 상태",
+ "desc": "텍스트/이미지/영상 모델을 언제든 전환. 해상도와 길이는 모델에 연동됩니다."
+ },
+ "script": {
+ "title": "1단계 · 대본",
+ "desc": "(전제: 설정 페이지에서 AI 서비스 설정 완료) 원문을 붙여넣고 \"AI 재작성\"으로 촬영용 대본을 생성합니다."
+ },
+ "assets": {
+ "title": "2단계 · 에셋",
+ "desc": "캐릭터/장면/소품을 추출하고 일관성 있는 참조 이미지를 생성합니다. 영상 생성 시 참조 소재로 사용됩니다."
+ },
+ "videos": {
+ "title": "3단계 · 영상 제작",
+ "desc": "스토리보드 분할 → 프롬프트 확인 → 일괄 영상 생성. 실패는 원클릭 재시도. 완료 후 병합·내보내기."
+ },
+ "help": {
+ "title": "언제든 다시 보기",
+ "desc": "이 \"?\" 버튼으로 이 페이지의 가이드를 다시 재생할 수 있습니다. 즐거운 제작 되세요!"
+ }
+ }
}
}
diff --git a/frontend/app/locales/zh.json b/frontend/app/locales/zh.json
index 0a1e590..e715dd9 100644
--- a/frontend/app/locales/zh.json
+++ b/frontend/app/locales/zh.json
@@ -76,6 +76,15 @@
},
"localeSwitcher": {
"label": "切换界面语言"
+ },
+ "langSwitch": {
+ "title": "切换语言为 {lang}?",
+ "message": "界面语言与 AI 内容语言将同步切换。",
+ "effectUi": "界面文案全部切换为该语言",
+ "effectAi": "剧本改写、资产提取、分镜、提示词等 AI 产出改用该语言(Agent 提示词/技能同步)",
+ "effectRefresh": "确认后界面会自动刷新",
+ "confirm": "切换并刷新",
+ "refreshing": "语言已切换,正在刷新…"
}
},
"composables": {
@@ -235,12 +244,12 @@
},
"general": {
"title": "通用",
- "desc": "应用级通用设置。AI 内容语言与界面语言相互独立,分别控制。",
+ "desc": "应用级通用设置。语言切换同时作用于界面与 AI 生成内容。",
"contentLanguage": "AI 内容语言",
- "contentLanguageSub": "剧本改写、资产提取、分镜、提示词等 AI 产出统一使用的语言",
- "languageLabel": "目标语言",
- "languageNote": "仅影响新生成的内容,不会翻译已有内容",
- "languageHint": "与界面语言相互独立。已有资产的「{'@'}引用」名字保持原名,新生成内容按所选语言产出。",
+ "contentLanguageSub": "界面与 AI 产出(剧本/资产/分镜/提示词)统一使用的语言",
+ "languageLabel": "语言",
+ "languageNote": "切换后界面与 AI 内容语言同步更新,并自动刷新",
+ "languageHint": "两处入口(顶栏语言按钮 / 此处)等价,切换即全局生效。",
"languageSaved": "内容语言已保存",
"appearance": "外观",
"appearanceSub": "界面颜色主题,即时生效",
@@ -248,7 +257,13 @@
"appearanceNote": "跟随系统时,随操作系统外观自动切换",
"appearanceLight": "浅色",
"appearanceDark": "深色",
- "appearanceSystem": "跟随系统"
+ "appearanceSystem": "跟随系统",
+ "languageSavedWith": "AI 内容语言已切换为 {lang},后续生成(剧本/资产/分镜/提示词)将使用该语言",
+ "langNameZh": "中文",
+ "langNameEn": "English",
+ "langNameJa": "日本語",
+ "langNameKo": "한국어",
+ "unifiedSwitchWarning": "已切换为 {lang},界面与 AI 内容语言将同步更新,即将刷新…"
},
"ai": {
"title": "AI 服务配置",
@@ -347,7 +362,7 @@
"storyboardBreaker": "分镜拆解",
"promptGenerator": "提示词",
"langFallback": "跟随中文",
- "langPickerTitle": "选择要编辑的语言版本(生成时按 AI 内容语言加载)"
+ "followContentLang": "编辑语言跟随:{lang}(在「通用 → AI 内容语言」切换)"
},
"skills": {
"agentList": "Agent 列表",
@@ -851,5 +866,57 @@
"moderation": "内容未通过审核,请调整提示词或切换模型后重试",
"requestFailed": "请求失败({status})",
"unknown": "操作失败,请重试"
+ },
+ "tour": {
+ "next": "下一步",
+ "prev": "上一步",
+ "done": "完成",
+ "helpTitle": "使用引导",
+ "index": {
+ "welcome": {
+ "title": "👋 欢迎使用火宝短剧",
+ "desc": "小说 → 剧本 → 资产 → 分镜 → 视频 → 成片,一站式 AI 短剧制作。先配置 AI 服务,再创建第一个项目。"
+ },
+ "create": {
+ "title": "第 2 步 · 新建项目",
+ "desc": "点「新建项目」:填写剧名、选择画面比例(横竖屏)与画面风格。"
+ },
+ "settings": {
+ "title": "第 1 步 · 配置 AI 服务",
+ "desc": "所有 AI 功能都要先配置。点这里进「设置」页,粘贴 Huobao API Key 一键完成文本/图片/视频三条配置。"
+ }
+ },
+ "settings": {
+ "quick": {
+ "title": "最快上手:快捷配置",
+ "desc": "粘贴 Huobao API Key,一键写入文本、图片、视频三条推荐配置,支持连通性测试。"
+ },
+ "nav": {
+ "title": "全部配置都在这",
+ "desc": "左侧切换:AI 服务、通用(界面语言/内容语言)、风格预设、Agent 提示词与技能、存储位置、关于更新。"
+ }
+ },
+ "episode": {
+ "topbar": {
+ "title": "顶栏:模型与状态",
+ "desc": "随时切换本次生成用的文本/图片/视频模型;分辨率与时长档位随模型联动。"
+ },
+ "script": {
+ "title": "第 1 步 · 剧本",
+ "desc": "(前提:设置页已配置 AI 服务)粘贴原始小说,点「AI 改写」生成拍摄剧本;满意后进入制作。"
+ },
+ "assets": {
+ "title": "第 2 步 · 资产制作",
+ "desc": "提取角色/场景/道具并生成一致性参考图,生视频时自动作为参考素材。"
+ },
+ "videos": {
+ "title": "第 3 步 · 视频制作",
+ "desc": "拆分分镜 → 检查提示词 → 批量生成视频;失败可一键重试。完成后在「拼接导出」合成成片。"
+ },
+ "help": {
+ "title": "随时重看引导",
+ "desc": "点这个「?」按钮可重新播放本页引导。祝创作顺利!"
+ }
+ }
}
}
diff --git a/frontend/app/pages/index.vue b/frontend/app/pages/index.vue
index bd7e41c..40a0cd0 100644
--- a/frontend/app/pages/index.vue
+++ b/frontend/app/pages/index.vue
@@ -11,12 +11,17 @@
<span class="tag tag-success">{{ t('index.hero.activeCount', { n: dramas.filter(d => currentStatus(d) === 'active').length }) }}</span>
<span class="tag tag-accent">{{ t('index.hero.styleCount', { n: stylePresets.length }) }}</span>
</div>
- <button class="btn btn-primary" @click="showCreate = true">
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round">
- <line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>
- </svg>
- {{ t('index.create') }}
- </button>
+ <div class="head-actions">
+ <button class="btn btn-icon tour-help-btn" :title="t('tour.helpTitle')" @click="startTour('index', INDEX_TOUR, t)">
+ <CircleHelp :size="15" :stroke-width="1.8" />
+ </button>
+ <button class="btn btn-primary" @click="showCreate = true">
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round">
+ <line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>
+ </svg>
+ {{ t('index.create') }}
+ </button>
+ </div>
</div>
<div class="toolbar">
@@ -196,9 +201,10 @@
import { toast } from 'vue-sonner'
import { toastError } from '~/composables/useToast'
import { useI18n } from 'vue-i18n'
-import { Clock } from 'lucide-vue-next'
+import { Clock, CircleHelp } from 'lucide-vue-next'
import { dramaAPI, stylePresetAPI } from '~/composables/useApi'
import BaseSelect from '~/components/BaseSelect.vue'
+import { startTour, autoTour } from '~/composables/useTour'
const { t, locale } = useI18n()
@@ -358,6 +364,14 @@ function fmtDate(s) {
}
onMounted(load)
+
+// ===== 应用内引导(首页):3 步 — 欢迎 / 新建项目 / AI 配置提醒 =====
+const INDEX_TOUR = [
+ { element: '#__nuxt', titleKey: 'tour.index.welcome.title', descKey: 'tour.index.welcome.desc' },
+ { element: '.nav-link[href="/settings"]', titleKey: 'tour.index.settings.title', descKey: 'tour.index.settings.desc', popoverSide: 'bottom' },
+ { element: '.head-actions .btn-primary', titleKey: 'tour.index.create.title', descKey: 'tour.index.create.desc', popoverSide: 'bottom', popoverAlign: 'end' },
+]
+onMounted(() => setTimeout(() => autoTour('index', INDEX_TOUR, t), 600))
</script>
<style scoped>
@@ -389,6 +403,7 @@ onMounted(load)
.launcher-sub { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-stats { display: flex; gap: var(--sp-2); margin-left: auto; }
.launcher-head .btn { flex-shrink: 0; }
+.head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.toolbar {
display: flex;
diff --git a/frontend/app/pages/settings.vue b/frontend/app/pages/settings.vue
index c709968..fdb659e 100644
--- a/frontend/app/pages/settings.vue
+++ b/frontend/app/pages/settings.vue
@@ -370,28 +370,20 @@
</button>
</div>
- <!-- 子 tab:System Prompt / Skills(左)与语言切换(右)相互独立 -->
- <div class="agent-pane-tabs">
- <div class="agent-pane-tabs-nav">
- <button :class="['agent-pane-tab', { active: agentPane === 'prompt' }]" @click="agentPane = 'prompt'">System Prompt</button>
- <button :class="['agent-pane-tab', { active: agentPane === 'skills' }]" @click="agentPane = 'skills'">
- Skills<template v-if="agentSkillCount(selectedAgent) > 0"> ({{ agentSkillCount(selectedAgent) }})</template>
- </button>
- </div>
- <div class="agent-lang-picker" :title="t('settings.agents.langPickerTitle')">
- <button
- v-for="l in contentLangOptions"
- :key="l.value"
- type="button"
- :class="['agent-lang-option', { on: editLang === l.value }]"
- @click="setEditLang(l.value)"
- >{{ l.shortLabel || l.label }}</button>
- </div>
- </div>
-
- <!-- Prompt 面板 -->
+ <!-- Prompt 面板(子 tab 作为卡片头,与卡片同宽对齐) -->
<div v-if="agentPane === 'prompt'" class="card agent-card">
- <div class="agent-card-body" style="border-top:none">
+ <div class="agent-pane-tabs">
+ <div class="agent-pane-tabs-nav">
+ <button :class="['agent-pane-tab', { active: agentPane === 'prompt' }]" @click="agentPane = 'prompt'">System Prompt</button>
+ <button :class="['agent-pane-tab', { active: agentPane === 'skills' }]" @click="agentPane = 'skills'">
+ Skills<template v-if="agentSkillCount(selectedAgent) > 0"> ({{ agentSkillCount(selectedAgent) }})</template>
+ </button>
+ </div>
+ <span class="agent-lang-follow dim">
+ {{ t('settings.agents.followContentLang', { lang: contentLangLabel }) }}
+ </span>
+ </div>
+ <div class="agent-card-body">
<label class="field">
<span class="field-label">System Prompt <span class="dim">({{ t('settings.agents.promptHint', { file: promptFileName }) }})</span>
<span v-if="agentPromptFallback" class="tag agent-fallback-tag">{{ t('settings.agents.langFallback') }}</span>
@@ -411,8 +403,21 @@
</div>
</div>
- <!-- Skills 面板 -->
+ <!-- Skills 面板(子 tab 同为卡片头) -->
<template v-else>
+ <div class="agent-pane-tabs-wrap card">
+ <div class="agent-pane-tabs">
+ <div class="agent-pane-tabs-nav">
+ <button :class="['agent-pane-tab', { active: agentPane === 'prompt' }]" @click="agentPane = 'prompt'">System Prompt</button>
+ <button :class="['agent-pane-tab', { active: agentPane === 'skills' }]" @click="agentPane = 'skills'">
+ Skills<template v-if="agentSkillCount(selectedAgent) > 0"> ({{ agentSkillCount(selectedAgent) }})</template>
+ </button>
+ </div>
+ <span class="agent-lang-follow dim">
+ {{ t('settings.agents.followContentLang', { lang: contentLangLabel }) }}
+ </span>
+ </div>
+ </div>
<p class="settings-desc" style="margin-top:0">{{ t('settings.skills.desc') }}</p>
<!-- 无 skill 提示 -->
@@ -655,6 +660,8 @@ import { useDesktopBridge } from '~/composables/useDesktopBridge'
import { useMigrateState } from '~/composables/useMigrateState'
import { useTheme } from '~/composables/useTheme'
import { providerIconUrl } from '~/composables/useProviderIcon'
+import { startTour, autoTour } from '~/composables/useTour'
+import { confirmUnifiedLanguage } from '~/composables/useUnifiedLanguage'
const { t } = useI18n()
@@ -945,24 +952,19 @@ const contentLangOptions = [
{ value: 'ja', label: '日本語', shortLabel: '日本語' },
{ value: 'ko', label: '한국어', shortLabel: '한국어' },
]
-// ===== Agent 配置:prompt/skill 编辑的语言版本(默认跟随内容语言) =====
-const editLang = ref('zh')
+// ===== Agent 配置:prompt/skill 编辑的语言版本(只读跟随内容语言) =====
const agentPromptFallback = ref(false) // 当前语言无独立 prompt 文件,展示的是回退内容
const skillContentFallback = ref(false) // 同上,skill 编辑器
const promptFileName = computed(() => `workspace/prompts/${selectedAgent.value}${editLang.value !== 'zh' ? `.${editLang.value}` : ''}.md`)
const skillFileName = computed(() => `SKILL${editLang.value !== 'zh' ? `.${editLang.value}` : ''}.md`)
-async function setEditLang(lang) {
- if (editLang.value === lang) return
- editLang.value = lang
- // 系统提示词、Skill 列表(名称/描述)、展开中的 Skill 内容同步切到目标语言
- await Promise.all([loadAgentPrompt(selectedAgent.value), loadAllSkills()])
- if (editingSkill.value) {
- const id = editingSkill.value
- editingSkill.value = null
- await toggleSkillEdit(id)
- }
-}
+// Agent 编辑语言 = 全局内容语言的只读镜像(改语言请到「通用」页)
+const editLang = computed(() => contentLanguage.value)
+const contentLangLabel = computed(() =>
+ contentLangOptions.find(l => l.value === contentLanguage.value)?.label || contentLanguage.value)
+
+// 内容语言变化时同步刷新 Agent 面板(提示词、Skill 列表与展开内容)
+// 内容语言切换后整页刷新(setUnifiedLanguage),无需局部 watch 同步
// ===== 通用:外观主题(localStorage 持久化,即时生效) =====
const { themeMode, setThemeMode } = useTheme()
const themeOptions = computed(() => [
@@ -980,15 +982,8 @@ async function loadContentLanguage() {
}
async function setContentLanguage(lang) {
if (contentLanguage.value === lang) return
- const prev = contentLanguage.value
- contentLanguage.value = lang
- try {
- await settingsAPI.setContentLanguage(lang)
- toast.success(t('settings.general.languageSaved'))
- } catch (e) {
- contentLanguage.value = prev
- toastError(e)
- }
+ // UI 语言 = AI 内容语言:确认弹窗 → 统一切换 → 刷新(顶栏 LocaleSwitcher 同一入口)
+ await confirmUnifiedLanguage(lang)
}
onMounted(loadContentLanguage)
@@ -1169,6 +1164,14 @@ async function saveStyle() {
onMounted(() => { loadCfgs(); loadAgents(); loadAllSkills(); loadAgentPrompt(selectedAgent.value); loadStylePresets() })
+// ===== 应用内引导(设置页):快捷配置 + 手动模板两步 =====
+const SETTINGS_TOUR = [
+ { element: '.quick-card', titleKey: 'tour.settings.quick.title', descKey: 'tour.settings.quick.desc', popoverSide: 'bottom' },
+ { element: '.nav-item:has(.lucide-cpu), .nav-item:nth-of-type(1)', titleKey: 'tour.settings.nav.title', descKey: 'tour.settings.nav.desc', popoverSide: 'right' },
+]
+onMounted(() => setTimeout(() => autoTour('settings', SETTINGS_TOUR, t), 800))
+function replaySettingsTour() { startTour('settings', SETTINGS_TOUR, t) }
+
// ===== 存储位置 =====
const desktopBridge = useDesktopBridge()
const { begin: beginMigrate, update: updateMigrate, end: endMigrate } = useMigrateState()
@@ -1319,6 +1322,11 @@ async function applyUpdate() {
watch(tab, (t) => {
if (t === 'about') refreshUpdateState()
+ // 进入 Agent 页总是按当前内容语言重载(幂等):兜住「先切语言、后进 Agent」的时序
+ if (t === 'agents') {
+ loadAgentPrompt(selectedAgent.value)
+ loadAllSkills()
+ }
})
onBeforeUnmount(stopUsagePoll)
@@ -1350,6 +1358,8 @@ onBeforeUnmount(stopUsagePoll)
.settings-content { flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.settings-scroll { height: 100%; overflow-y: auto; padding: 20px 28px 48px; animation: fadeUp 0.3s var(--ease-out); }
+/* 各分组卡片之间的间距(通用页内容语言/外观等) */
+.settings-scroll > .card + .card { margin-top: 14px; }
/* 宽屏下内容列限宽居中,两侧留出呼吸空间 */
.settings-scroll > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.settings-head { margin-bottom: 20px; }
@@ -1543,40 +1553,34 @@ onBeforeUnmount(stopUsagePoll)
display: flex; align-items: center; justify-content: center;
font-size: 16px; flex-shrink: 0;
}
-.agent-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); }
+.agent-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
+/* tab 头在上,body 不再需要顶边框(头自带 border-bottom) */
.agent-card-foot { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
-/* Agent 右侧子 tab(System Prompt / Skills)与语言切换:两个独立胶囊,互不混排 */
+/* Agent 右侧子 tab(System Prompt / Skills):作为卡片头,与卡片同宽,不再单独悬浮 */
.agent-pane-tabs {
display: flex; align-items: center; justify-content: space-between; gap: 12px;
- margin: 14px 0 14px;
+ padding: 10px 16px;
+ border-bottom: 1px solid var(--border);
}
+.agent-pane-tabs-wrap .agent-pane-tabs { border-bottom: 1px solid var(--border); }
+.agent-pane-tabs-wrap { padding: 0; margin-bottom: 14px; overflow: hidden; }
.agent-pane-tabs-nav {
- display: flex; gap: 2px; width: fit-content; padding: 3px;
+ display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px;
background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
}
.agent-pane-tab {
- padding: 5px 16px; border: none; border-radius: 7px;
+ padding: 5px 18px; border: none; border-radius: 7px;
background: transparent; color: var(--text-2);
font: 600 12px var(--font-body); cursor: pointer;
+ white-space: nowrap; text-align: center;
transition: background 0.15s, color 0.15s;
}
.agent-pane-tab:hover { color: var(--text-0); }
.agent-pane-tab.active { background: var(--accent-bg); color: var(--accent-text); }
-/* 语言版本切换(prompt/skill 编辑器右上角) */
-.agent-lang-picker {
- display: flex; gap: 2px; padding: 3px;
- border-radius: 10px; background: var(--bg-1); border: 1px solid var(--border);
-}
-.agent-lang-option {
- padding: 4px 12px; border: none; border-radius: 7px;
- background: transparent; color: var(--text-3);
- font: 600 11.5px var(--font-body); cursor: pointer;
- transition: background 0.15s, color 0.15s;
-}
-.agent-lang-option:hover { color: var(--text-1); }
-.agent-lang-option.on { background: var(--surface-raised); color: var(--text-0); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
+/* Agent 编辑语言跟随提示(卡片头右侧只读说明,切换请到「通用」页) */
+.agent-lang-follow { font-size: 11px; }
/* 「跟随中文」回退提示 */
.agent-fallback-tag {
@@ -1593,8 +1597,8 @@ onBeforeUnmount(stopUsagePoll)
.skills-layout { display: flex; height: 100%; overflow: hidden; }
.skills-agent-list {
width: 210px; flex-shrink: 0; border-right: 1px solid var(--border);
- display: flex; flex-direction: column;
- overflow-y: auto; padding: 4px 10px 16px;
+ display: flex; flex-direction: column; gap: 4px;
+ overflow-y: auto; padding: 20px 10px 16px; /* 顶 padding 与右侧标题行起点对齐 */
}
.skills-agent-title {
font-size: 11px; font-weight: 650; letter-spacing: 0.06em;
@@ -1618,7 +1622,13 @@ onBeforeUnmount(stopUsagePoll)
}
.skills-agent-item.active .skill-count-badge { background: var(--accent-bg); color: var(--accent-text); }
.skills-main { flex: 1; min-width: 0; }
-.skills-head { display: flex; align-items: flex-start; gap: 12px; }
+.skills-head {
+ display: flex;
+ align-items: flex-start; /* 以标题块顶部为基线,徽章/按钮对齐标题第一行 */
+ gap: 12px;
+}
+.skills-head .settings-title { line-height: 26px; }
+.skills-head .btn { margin-top: -2px; } /* 视觉上与标题第一行居中(按钮比标题行高) */
.skills-head-badge { width: 32px; height: 32px; font-size: 16px; }
.skills-head-copy { min-width: 0; }
.skills-empty { padding: 48px 24px; text-align: center; }
diff --git a/frontend/app/views/drama/episode.vue b/frontend/app/views/drama/episode.vue
index 766fef3..80ce711 100644
--- a/frontend/app/views/drama/episode.vue
+++ b/frontend/app/views/drama/episode.vue
@@ -54,6 +54,9 @@
</div>
<div class="studio-actions">
<LocaleSwitcher />
+ <button class="btn btn-icon tour-help-btn" :title="t('tour.helpTitle')" @click="startTour('episode', EPISODE_TOUR, t)">
+ <CircleHelp :size="14" :stroke-width="1.8" />
+ </button>
<button class="btn" @click="refresh">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg>
{{ t('common.refresh') }}
@@ -1428,9 +1431,10 @@ import { toast } from 'vue-sonner'
import { useI18n } from 'vue-i18n'
import {
Users, FileText, FolderKanban, Clapperboard, Download, Loader2,
- Plus, X, ListTodo,
+ Plus, X, ListTodo, CircleHelp,
} from 'lucide-vue-next'
import { api, dramaAPI, episodeAPI, storyboardAPI, characterAPI, sceneAPI, propAPI, taskAPI, mergeAPI, aiConfigAPI, uploadAPI } from '~/composables/useApi'
+import { startTour, autoTour } from '~/composables/useTour'
import { useAgent } from '~/composables/useAgent'
import { toastError, mapError, MODERATION_RE } from '~/composables/useToast'
import LocaleSwitcher from '~/components/LocaleSwitcher.vue'
@@ -3357,6 +3361,16 @@ async function loadConfigs() {
}
onMounted(async () => { await refresh(); loadConfigs(); syncExtractStatus() })
+
+// ===== 应用内引导(工作台):沿左侧进度栏走 6 步流水线 =====
+const EPISODE_TOUR = [
+ { element: '.studio-topbar-main', titleKey: 'tour.episode.topbar.title', descKey: 'tour.episode.topbar.desc', popoverSide: 'bottom' },
+ { element: '.pipe-section:nth-of-type(1)', titleKey: 'tour.episode.script.title', descKey: 'tour.episode.script.desc', popoverSide: 'right' },
+ { element: '.pipe-section:nth-of-type(2)', titleKey: 'tour.episode.assets.title', descKey: 'tour.episode.assets.desc', popoverSide: 'right' },
+ { element: '.pipe-section:nth-of-type(2) .pipe-item:last-child', titleKey: 'tour.episode.videos.title', descKey: 'tour.episode.videos.desc', popoverSide: 'right' },
+ { element: '.studio-actions .tour-help-btn', titleKey: 'tour.episode.help.title', descKey: 'tour.episode.help.desc', popoverSide: 'bottom', popoverAlign: 'end' },
+]
+onMounted(() => setTimeout(() => autoTour('episode', EPISODE_TOUR, t), 900))
</script>
<style scoped>
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 0d09d97..63e48d5 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -7,6 +7,7 @@
"name": "huobao-drama-frontend",
"hasInstallScript": true,
"dependencies": {
+ "driver.js": "^1.8.0",
"lucide-vue-next": "^0.511.0",
"nuxt": "^3.17.5",
"vue": "^3.5.13",
@@ -5245,6 +5246,12 @@
"url": "https://dotenvx.com"
}
},
+ "node_modules/driver.js": {
+ "version": "1.8.0",
+ "resolved": "https://packages.aliyun.com/69c39010f167bac7fd2502e3/npm/npm-registry/driver.js/-/driver.js-1.8.0.tgz",
+ "integrity": "sha512-+8/IO7h1v14IzWh2GP60N7T3PFZweXwdn5e5POuxRSBoCYUojsBxzqawPeXh3YZIibRy7EehYNEyxe7slwwtdg==",
+ "license": "MIT"
+ },
"node_modules/duplexer": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index 8124c1e..964affa 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -10,6 +10,7 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
+ "driver.js": "^1.8.0",
"lucide-vue-next": "^0.511.0",
"nuxt": "^3.17.5",
"vue": "^3.5.13",