feat: AI生图提示词翻译成英文后再发往上流(img2img 全链路 + 视频/设置改动)

This commit is contained in:
jinghui committed 2026-11-19 08:30:20 +08:00
1 parent 76d9d45770
commit b6e0c475d3
9 files changed
+1169 -34

No files matched your search

+12 -1
View File
@@ -1,5 +1,5 @@
import { useState, useEffect, useMemo, useRef } from 'react';
import { Sun, Moon, Search, Filter, Sliders, RefreshCw, ScanLine, Star, Bell, Github, Settings, ExternalLink, Wand2 } from 'lucide-react';
import { Sun, Moon, Search, Filter, Sliders, RefreshCw, ScanLine, Star, Bell, Github, Settings, ExternalLink, Wand2, Film } from 'lucide-react';
import { useLibraryStore } from '../stores/useLibraryStore';
import { useImageStore } from '../stores/useImageStore';
import { useUIStore } from '../stores/useUIStore';
@@ -9,6 +9,7 @@ import { useHub } from '../hooks/useHub';
import { libraryAPI, scanAPI, watchAPI } from '../api';
import SettingsModal from './SettingsModal';
import AIGenModal from './AIGenModal';
import AIVideoStudioModal from './AIVideoStudioModal';
import { createLogger } from '../utils/logger';
const logger = createLogger('Header');
@@ -33,6 +34,7 @@ function Header() {
const [showSettings, setShowSettings] = useState(false);
const [settingsTab, setSettingsTab] = useState('ocr');
const [showAIGen, setShowAIGen] = useState(false);
const [showAIVideo, setShowAIVideo] = useState(false);
const searchDebounceRef = useRef(null);
// 授权系统 hub:版本 / 公告 / 在线人数
@@ -410,6 +412,14 @@ function Header() {
)}
</div>
<button
onClick={() => setShowAIVideo(true)}
title="AI 生成视频"
className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
>
<Film className="w-5 h-5 text-purple-600 dark:text-purple-400" />
</button>
<button
onClick={() => setShowAIGen(true)}
title="AI 生图"
@@ -432,6 +442,7 @@ function Header() {
<SettingsModal open={showSettings} onClose={() => setShowSettings(false)} versionLabel={appVersion} initialTab={settingsTab} />
<AIGenModal open={showAIGen} onClose={() => setShowAIGen(false)} />
{showAIVideo && <AIVideoStudioModal libraryId={currentLibraryId} onClose={() => setShowAIVideo(false)} onDone={() => { setShowAIVideo(false); window.location.reload(); }} />}
</>
);