5 Commits
Author SHA1 Message Date
jinghui edfbb67cdb v1.4.17: AI视频生成使用全部选中图片 + 转场效果选择 2026-11-22 12:48:51 +08:00
jinghui 254a939f55 v1.4.16: AI视频生成完成不再自动关闭弹窗 + 支持选择保存目录
- 生成完成后弹窗保持打开(原 1.2s 后自动 onClose 移除),手动「关闭并刷新」
- 新增「保存到目录」下拉(素材库根目录+全部子文件夹),后端按 saveDir 落库
- 双击图片灯箱:onDoubleClick 增加 preventDefault 防浏览器吞双击事件
2026-11-22 12:00:08 +08:00
jinghui bf69419c68 v1.4.15: fix getOriginalUrl/getThumbnailUrl URL encoding for paths with Chinese/spaces/#/? 2026-11-20 21:17:16 +08:00
jinghui d6b1989a4c /vol2/1000/HD2 改为整盘挂载 (以后新建目录直接可添加素材库)
- 5 个逐目录挂载合并为 1 行父挂载, 等价无损
- 端到端验证: 新建零配置目录建库 200, 清理无残留
- README compose/docker run 示例与部署注释同步简化, CHANGELOG 并入 v1.4.14
2026-11-20 20:54:24 +08:00
jinghui f0a59e6642 补挂载 /vol2/1000/HD2/学习资料 (修「素材库路径不存在」)
- docker-compose.yml volumes + README compose/docker run 两处示例
- 端到端建库验证 200 通过, 清理无残留; CHANGELOG 并入 v1.4.14 条目
2026-11-20 20:48:21 +08:00
12 changed files with 176 additions and 53 deletions

No files matched your search

+5 -1
View File
@@ -6,8 +6,12 @@
- 灯箱列表本身也同步过滤为纯图片:左右方向键/箭头按钮翻页不会再翻到视频、文档等打不开的项;顶部「序号 / 总数」与缩略图条均按图片计数
- 视频、文档的行为不变:双击仍弹出各自的播放/查看器,不进灯箱
- 🔧 **新增「素材」目录挂载**:docker-compose.yml 与 README(compose / docker run 两种方式)补挂载 `/vol2/1000/HD2/素材`,该目录可正常添加为素材库(此前报「素材库路径不存在」)
- 🔧 **新增「学习资料」目录挂载**:docker-compose.yml 与 README(compose / docker run 两种方式)补挂载 `/vol2/1000/HD2/学习资料`(同上修复「素材库路径不存在」,端到端建库验证通过)
- 🔧 **挂载方式升级为整盘**:`/vol2/1000/HD2` 下 5 个逐目录挂载合并为一行整盘挂载 `- /vol2/1000/HD2:/vol2/1000/HD2` —— 该盘下任意子目录(含以后在飞牛上新建的文件夹)可直接在页面添加为素材库,不再需要改配置重启;README compose / docker run 示例同步简化
## 2026-11-19 → v1.4.13
## 2026-11-20 → v1.4.15
- 🐛 **修复「部分目录图片双击不弹出灯箱」**:`getOriginalUrl`/`getThumbnailUrl` 未对含中文/空格/#/? 的路径做 URL 编码,原图请求 404 → 灯箱图片加载失败 → 用户感知「双击不弹」。按 `/` 分段 `encodeURIComponent` 修复,灯箱/新窗口打开/导出/编辑 全链路受益
- ✨ **灯箱底部新增缩略图条**:双击图片放大后,底部列出当前文件夹(含筛选结果)的全部图片缩略图,点任意一张直接跳转查看,不用一张张翻
- 缩略图条显示「当前序号 / 总数」,当前图紫色高亮并自动滚动居中;切图时(含左右方向键/箭头按钮)缩略图条同步跟随
+6 -12
View File
@@ -99,11 +99,8 @@ services:
ports:
- "15002:15002"
volumes:
# 素材库目录(容器内路径与宿主机一致,中文路径直接填,按需增减)
- /vol2/1000/HD2/壁纸:/vol2/1000/HD2/壁纸
- /vol2/1000/HD2/我的文档:/vol2/1000/HD2/我的文档
- /vol2/1000/HD2/发布到平台的图片和视频:/vol2/1000/HD2/发布到平台的图片和视频
- /vol2/1000/HD2/素材:/vol2/1000/HD2/素材
# 数据盘整盘挂载(容器内路径与宿主机一致,中文路径直接填):盘下任意子目录含以后新建的,可直接添加为素材库
- /vol2/1000/HD2:/vol2/1000/HD2
# 持久化配置(素材库列表、管理员密码,不用改)
- /vol3/1000/HD3/docker/flypic/config:/root/.flypic
environment:
@@ -117,10 +114,10 @@ services:
```
```bash
# 首次部署(编辑 volumes 换成你的素材库目录)
# 首次部署(编辑 volumes 把整盘或你的素材目录挂进来)
docker compose up -d --build
# 新增素材库:volumes 加一行挂载后重启
# 新增素材库:整盘挂载后直接在页面添加即可,无需改配置
docker compose up -d
# 更新代码
@@ -143,16 +140,13 @@ docker run -d --name flypic --restart unless-stopped \
-e FRONTEND_DIST=/app/backend/public \
-e NODE_ENV=production \
-v /vol3/1000/HD3/docker/flypic/config:/root/.flypic \
-v /vol2/1000/HD2/壁纸:/vol2/1000/HD2/壁纸 \
-v "/vol2/1000/HD2/我的文档:/vol2/1000/HD2/我的文档" \
-v "/vol2/1000/HD2/发布到平台的图片和视频:/vol2/1000/HD2/发布到平台的图片和视频" \
-v "/vol2/1000/HD2/素材:/vol2/1000/HD2/素材" \
-v "/vol2/1000/HD2:/vol2/1000/HD2" \
jpccr.ccs.tencentyun.com/jinghui/flypic:latest
```
- 公网镜像 `jpccr.ccs.tencentyun.com/jinghui/flypic:latest`(匿名可拉);内网镜像 `192.168.68.19:3200/jinghui/flypic:latest`
- 没有镜像就本地构建:`docker build -t flypic:latest .`,替换上面的镜像名
- 素材库目录按需增减 `-v`(容器内路径与宿主机一致)
- 素材库挂载:推荐整盘 `-v "/数据盘:/数据盘"`(盘下任意子目录直接添加、免改配置),也可只挂需要的子目录 `-v`(容器内路径与宿主机一致)
## 📝 使用注意
+46 -23
View File
@@ -136,6 +136,7 @@ router.post(
voice = 'zh-CN-XiaoxiaoNeural',
resolution = '1920x1080',
extraPrompt = '',
saveDir = '',
subtitleStyle = {}
} = req.body || {};
@@ -426,6 +427,8 @@ router.post(
voice = 'zh-CN-XiaoxiaoNeural',
resolution = '1920x1080',
extraPrompt = '',
saveDir = '',
transition = 'fade',
subtitleStyle = {}
} = req.body || {};
if (!libraryId) throw new ValidationError('缺少 libraryId');
@@ -447,39 +450,53 @@ router.post(
if (!url) throw new ValidationError('未配置模型接口地址(请到右上角设置 → AI 视频里填写)');
if (!key) throw new ValidationError('请先在右上角设置 → AI 视频里填写模型 KEY');
// 转场效果白名单(防注入 ffmpeg filter)
const TRANSITIONS = new Set(['cut','fade','fadeblack','fadewhite','slideleft','slideright','slideup','slidedown','circlecrop','circleopen','circleclose','dissolve','smoothleft','smoothright','wipeleft','wiperight','pixelize','radial','hblur']);
const trans = TRANSITIONS.has(String(transition)) ? String(transition) : 'fade';
const id = `vt${++textTaskSeq}_${Date.now()}`;
const [w, h] = String(resolution).split('x').map((n) => parseInt(n, 10));
const task = { id, status: 'running', step: 'script', stepLabel: '正在生成', progress: 0, error: '', resultPath: '', createdAt: Date.now() };
textTasks.set(id, task);
setTimeout(() => textTasks.delete(id), 30 * 60 * 1000);
runTextVideo({ task, library, title: String(title).trim(), content: text, images, url, key, model: mdl, voice, width: Number.isFinite(w)?w:1920, height: Number.isFinite(h)?h:1080, extraPrompt: String(extraPrompt||''), subtitleStyle: subtitleStyle||{}, req }).catch((err) => {
runTextVideo({ task, library, title: String(title).trim(), content: text, images, url, key, model: mdl, voice, width: Number.isFinite(w)?w:1920, height: Number.isFinite(h)?h:1080, extraPrompt: String(extraPrompt||''), saveDir: String(saveDir||''), transition: trans, subtitleStyle: subtitleStyle||{}, req }).catch((err) => {
task.status = 'error'; task.error = err.message || String(err);
});
res.json({ success: true, taskId: id });
})
);
async function runTextVideo(ctx) {
const { task, library, title, content, images, url, key, model, voice, width, height, extraPrompt, subtitleStyle, req } = ctx;
const { task, library, title, content, images, url, key, model, voice, width, height, extraPrompt, saveDir, transition, subtitleStyle, req } = ctx;
const work = fs.mkdtempSync(path.join(os.tmpdir(), 'flypic-tv-'));
try {
// 生成背景图(若无图片)
let bgPath = '';
// 解析全部选中图片(本地库路径 / 远程 URL 下载)—— 让每张选中图片都进视频
const imagePaths = [];
if (Array.isArray(images) && images.length) {
// 用第一张图作为背景
const rel = typeof images[0] === 'string' ? images[0] : images[0].path || images[0].url;
if (rel && fs.existsSync(path.join(library.path, rel))) bgPath = path.join(library.path, rel);
else if (rel && /^https?:/i.test(rel)) {
// 下载
try {
const r = await fetch(rel); const buf = Buffer.from(await r.arrayBuffer());
bgPath = path.join(work, 'bg.jpg'); fs.writeFileSync(bgPath, buf);
} catch (_) {}
for (const it of images) {
const rel = typeof it === 'string' ? it : (it && (it.path || it.url)) || '';
if (!rel) continue;
if (/^https?:/i.test(rel)) {
try {
const r = await fetch(rel);
const buf = Buffer.from(await r.arrayBuffer());
const ext = (path.extname(new URL(rel).pathname) || '.jpg').toLowerCase();
const fp = path.join(work, `img${imagePaths.length}${ext}`);
fs.writeFileSync(fp, buf);
imagePaths.push(fp);
} catch (e) { logger.warn('图片下载失败: ' + e.message); }
} else {
const abs = path.join(library.path, rel);
if (fs.existsSync(abs)) imagePaths.push(abs);
}
}
}
if (!bgPath) {
bgPath = path.join(work, 'bg.png');
// 兜底:无图时生成纯色背景
if (!imagePaths.length) {
const bgPath = path.join(work, 'bg.png');
await videotool.run('ffmpeg', ['-y', '-f', 'lavfi', '-i', `color=c=0x1a1a2e:s=${width}x${height}`, '-frames:v', '1', bgPath], { timeoutMs: 60000 });
imagePaths.push(bgPath);
}
// LLM 生成分镜:基于内容切分
@@ -488,18 +505,20 @@ async function runTextVideo(ctx) {
if (content) {
// 让模型按内容生成 N 段(N = min(8, 句子数))
const sentences = content.split(/[。!?.!?]/).map(s=>s.trim()).filter(Boolean);
const n = Math.min(8, Math.max(2, sentences.length));
const baseN = Math.min(8, Math.max(2, sentences.length));
const n = Math.max(baseN, imagePaths.length); // 分镜数 ≥ 选中图片数,保证每张图都出现
script = await llmScript({ url, key, model, title, count: n, extraPrompt: (extraPrompt + ' 内容:' + content.slice(0, 1500)).trim() });
} else {
script = [{ subtitle: title, tts: title }];
}
if (!Array.isArray(script) || !script.length) script = [{ subtitle: title, tts: title }];
// TTS + segments
// TTS + segments:每段轮换使用选中图片,保证所有图片都出现
const segments = [];
for (let i = 0; i < script.length; i++) {
task.step = 'tts'; task.stepLabel = `正在朗读 ${i+1}/${script.length}`; task.progress = 10 + Math.round((i/script.length)*40);
const seg = script[i];
const segCount = Math.max(script.length, imagePaths.length);
for (let i = 0; i < segCount; i++) {
task.step = 'tts'; task.stepLabel = `正在朗读 ${i+1}/${segCount}`; task.progress = 10 + Math.round((i/segCount)*40);
const seg = script[i % script.length] || {};
let ttsFile = ''; let dur = 0;
if (seg.tts) {
try {
@@ -507,7 +526,7 @@ async function runTextVideo(ctx) {
ttsFile = t.file; dur = t.seconds;
} catch (e) { logger.warn('TTS fail: ' + e.message); }
}
segments.push({ imagePath: bgPath, subtitle: seg.subtitle || seg.tts || title, ttsFile, duration: Math.max(2.5, Math.min(12, dur || 4)) });
segments.push({ imagePath: imagePaths[i % imagePaths.length], subtitle: seg.subtitle || seg.tts || title, ttsFile, duration: Math.max(2.5, Math.min(12, dur || 4)) });
}
// compose
@@ -520,12 +539,16 @@ async function runTextVideo(ctx) {
}
task.step = 'merge'; task.stepLabel = '合并'; task.progress = 96;
const finalTmp = path.join(work, 'final.mp4');
await videotool.concatSegments(segFiles, finalTmp);
await videotool.concatWithTransition(segFiles, finalTmp, { transition: transition || 'fade', width, height });
// 6) 落库:保存到用户选择的目录(默认素材库根目录)
const safeDir = String(saveDir || '').replace(/^\/+/, '').replace(/\.\./g, '');
const baseDir = safeDir ? path.join(library.path, safeDir) : library.path;
try { fs.mkdirSync(baseDir, { recursive: true }); } catch (_) {}
const safeTitle = String(title).replace(/[\\/:*?"<>|]/g, '_').slice(0, 60) || 'AI视频';
let target = path.join(library.path, `${safeTitle}.mp4`);
let target = path.join(baseDir, `${safeTitle}.mp4`);
let n = 1;
while (fs.existsSync(target)) { target = path.join(library.path, `${safeTitle}_${n}.mp4`); n++; }
while (fs.existsSync(target)) { target = path.join(baseDir, `${safeTitle}_${n}.mp4`); n++; }
fs.copyFileSync(finalTmp, target);
await reindex(req, library.path, target);
+1 -1
View File
@@ -16,7 +16,7 @@ const { getSettings } = require('./settings');
const HUB_URL = (process.env.HUB_URL || 'https://auth.88531.cn/api').replace(/\/+$/, '');
const HUB_PROJECT_ID = process.env.HUB_PROJECT_ID || '';
const HUB_API_KEY = process.env.HUB_API_KEY || '';
const SITE_VERSION = process.env.SITE_VERSION || '1.4.14';
const SITE_VERSION = process.env.SITE_VERSION || '1.4.15';
const TIMEOUT_MS = 8000;
const state = {
+52
View File
@@ -424,6 +424,57 @@ async function concatSegments(segFiles, outPath) {
}
}
/**
* 带转场拼接分段 mp4(xfade 交叉过渡 + 音频直拼)
* transition: cut/fade/slideleft/slideright/circleopen/dissolve/wipeleft/... (ffmpeg xfade 名)
* 失败时回退为普通硬拼接
*/
async function concatWithTransition(segFiles, outPath, { transition = 'fade', width = 1920, height = 1080 } = {}) {
const n = segFiles.length;
if (n <= 1 || !transition || transition === 'cut') return concatSegments(segFiles, outPath);
const F = 0.6; // 转场时长(秒)
const dir = tmpDir();
try {
// 探测每段真实时长,用于计算 xfade offset
const durs = [];
for (const f of segFiles) {
const p = await probeVideo(f);
durs.push(p.duration > 0.2 ? p.duration : 4);
}
const inputs = [];
for (const f of segFiles) inputs.push('-i', f);
const filters = [];
for (let i = 0; i < n; i++) {
filters.push(`[${i}:v]scale=${width}:${height}:force_original_aspect_ratio=decrease,pad=${width}:${height}:(ow-iw)/2:(oh-ih)/2,setsar=1,format=yuv420p,fps=30[v${i}]`);
}
let prev = 'v0';
let acc = durs[0];
for (let i = 1; i < n; i++) {
const offset = Math.max(0, acc - F);
const out = i === n - 1 ? 'vx' : `x${i}`;
filters.push(`[${prev}][v${i}]xfade=transition=${transition}:duration=${F}:offset=${offset.toFixed(3)}[${out}]`);
prev = out;
acc = acc + durs[i] - F;
}
const audioInputs = segFiles.map((_, i) => `[${i}:a]`).join('');
filters.push(`${audioInputs}concat=n=${n}:v=0:a=1[aout]`);
const args = [
'-y', ...inputs, '-filter_complex', filters.join(';'),
'-map', '[vx]', '-map', '[aout]',
'-c:v', 'libx264', '-preset', 'veryfast', '-crf', '20',
'-pix_fmt', 'yuv420p', '-movflags', '+faststart', outPath
];
await run(FFMPEG, args, { timeoutMs: 600 * 1000 });
return outPath;
} catch (err) {
// 转场失败回退硬拼接,保证出片
logger.warn && logger.warn(`⚠️ 转场拼接失败,回退硬拼接: ${err.message}`);
return concatSegments(segFiles, outPath);
} finally {
fs.rmSync(dir, { recursive: true, force: true });
}
}
module.exports = {
run,
probeVideo,
@@ -434,5 +485,6 @@ module.exports = {
generateTts,
buildSegment,
concatSegments,
concatWithTransition,
textToSrt
};
+3 -6
View File
@@ -10,11 +10,8 @@ services:
ports:
- "15002:15002"
volumes:
# 素材库目录(容器内路径与飞牛一致,直接填实际路径即可)
- /vol2/1000/HD2/壁纸:/vol2/1000/HD2/壁纸
- /vol2/1000/HD2/我的文档:/vol2/1000/HD2/我的文档
- /vol2/1000/HD2/发布到平台的图片和视频:/vol2/1000/HD2/发布到平台的图片和视频
- /vol2/1000/HD2/素材:/vol2/1000/HD2/素材
# 数据盘整盘挂载(容器内路径与飞牛一致):/vol2/1000/HD2 下任意子目录(含以后新建的)可直接添加为素材库,无需改配置
- /vol2/1000/HD2:/vol2/1000/HD2
# 持久化配置(config.json 存储素材库路径、密码等,不用改)
- /vol3/1000/HD3/docker/flypic/config:/root/.flypic
environment:
@@ -29,7 +26,7 @@ services:
- HUB_API_KEY=${HUB_API_KEY:-}
- NEWAPI_KEY=${NEWAPI_KEY:-}
# 当前站点版本(与 frontend/package.json、CHANGELOG 保持一致,界面版本徽标来源)
- SITE_VERSION=1.4.14
- SITE_VERSION=1.4.17
# 让容器经 host.docker.internal 访问宿主机的 AI 侧车
extra_hosts:
- "host.docker.internal:host-gateway"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "flypic-frontend",
"version": "1.4.0",
"version": "1.4.17",
"private": true,
"type": "module",
"scripts": {
+5 -2
View File
@@ -50,7 +50,8 @@ export async function getCacheMeta(libraryId) {
* 使用分片结构,不再需要 size 参数
*/
export function getThumbnailUrl(libraryId, filename, version) {
const base = `/api/image/thumbnail/${libraryId}/${filename}`;
const encoded = encodeURIComponent(filename);
const base = `/api/image/thumbnail/${libraryId}/${encoded}`;
// version=文件 modified_at,编辑保存后变化以穿透浏览器缓存
return version ? `${base}?v=${version}` : base;
}
@@ -59,7 +60,9 @@ export function getThumbnailUrl(libraryId, filename, version) {
* 获取原图 URL
*/
export function getOriginalUrl(libraryId, path) {
return `/api/image/original/${libraryId}/${path}`;
// 按 '/' 分段编码,避免中文/空格/#/? 等字符导致原图 URL 404(灯箱/新窗口打开失败)
const encoded = String(path).split('/').map(encodeURIComponent).join('/');
return `/api/image/original/${libraryId}/${encoded}`;
}
/**
+54 -4
View File
@@ -60,6 +60,9 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
const [keyword, setKeyword] = useState('');
const [picked, setPicked] = useState([]);
const [taskId, setTaskId] = useState('');
const [folders, setFolders] = useState([]);
const [saveDir, setSaveDir] = useState('');
const [transition, setTransition] = useState('fade');
const [task, setTask] = useState(null);
const [error, setError] = useState('');
const [starting, setStarting] = useState(false);
@@ -92,6 +95,26 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
useEffect(() => { if (libraryId) loadImages(''); }, [libraryId]);
const flattenFolders = (nodes, acc = []) => {
for (const n of (nodes || [])) {
if (n && n.path) acc.push(n.path);
if (n && n.children) flattenFolders(n.children, acc);
}
return acc;
};
useEffect(() => {
if (!libraryId) return;
(async () => {
try {
const r = await fetch(`/api/image/folders?libraryId=${libraryId}`, { headers: auth });
const d = await r.json();
const tree = (d && d.data && d.data.folders) || [];
setFolders(flattenFolders(tree));
} catch (_) { setFolders([]); }
})();
}, [libraryId]);
const togglePick = (img) => {
setPicked((list) => {
const i = list.findIndex((x) => x.path === img.path);
@@ -109,7 +132,6 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
setTask(d);
if (d.status === 'done' || d.status === 'error') {
clearInterval(iv);
if (d.status === 'done') setTimeout(() => { onDone && onDone(d.resultPath); onClose(); }, 1200);
}
} catch (_) {}
}, 1500);
@@ -157,7 +179,7 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
libraryId, title: title.trim(),
content: content.trim(),
images: imgs,
voice, resolution, extraPrompt: '',
voice, resolution, extraPrompt: '', saveDir, transition,
subtitleStyle: { position: subtitlePos, color: subtitleColor, fontSizePct: subtitleSize }
};
const r = await fetch('/api/video/aigenerate-text', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${getToken()}` }, body: JSON.stringify(body) });
@@ -351,6 +373,34 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
</div>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">保存到目录</label>
<select className={input} value={saveDir} onChange={(e) => setSaveDir(e.target.value)} disabled={running||done}>
<option value="">素材库根目录</option>
{folders.map((p) => <option key={p} value={p}>{p}</option>)}
</select>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">转场效果</label>
<select className={input} value={transition} onChange={(e) => setTransition(e.target.value)} disabled={running||done}>
<option value="cut">无转场(直接切换)</option>
<option value="fade">淡入淡出</option>
<option value="fadeblack">黑场淡入</option>
<option value="fadewhite">白场淡入</option>
<option value="slideleft">左滑</option>
<option value="slideright">右滑</option>
<option value="slideup">上滑</option>
<option value="slidedown">下滑</option>
<option value="dissolve">溶解</option>
<option value="wipeleft">左擦除</option>
<option value="wiperight">右擦除</option>
<option value="pixelize">像素化</option>
<option value="circleopen">圆圈打开</option>
<option value="hblur">模糊过渡</option>
</select>
</div>
<div className="flex items-start gap-2 rounded-lg bg-gray-50 dark:bg-gray-900/50 border border-gray-200 dark:border-gray-700 px-3 py-2 text-xs text-gray-600 dark:text-gray-400">
<Settings className="w-3.5 h-3.5 mt-0.5 flex-shrink-0" />
<span>提供商 / 模型 / KEY 在右上角「设置 → AI 视频」里配置,普通文本模型即可;配音与字幕由本地合成。</span>
@@ -374,8 +424,8 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
{error && <div className="text-sm text-red-600 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg px-3 py-2">{error}</div>}
<div className="flex justify-end gap-3 pt-1">
<button onClick={onClose} disabled={running||starting} className="px-4 py-2 text-sm rounded-lg border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50">
{done ? '关闭' : '取消'}
<button onClick={() => (done ? (onDone && onDone(task?.resultPath)) : onClose())} disabled={running||starting} className="px-4 py-2 text-sm rounded-lg border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50">
{done ? '关闭并刷新' : '取消'}
</button>
{!running && !done && (
<button onClick={handleStart} disabled={starting} className="px-5 py-2 text-sm rounded-lg bg-purple-600 hover:bg-purple-700 text-white font-medium disabled:opacity-50 flex items-center gap-2">
+1 -1
View File
@@ -40,7 +40,7 @@ const [showAIVideo, setShowAIVideo] = useState(false);
// 授权系统 hub:版本 / 公告 / 在线人数
const hub = useHub();
const announcements = hub.announcements || [];
const appVersion = hub.version ? `v${String(hub.version).replace(/^v/, '')}` : 'v1.4.14';
const appVersion = hub.version ? `v${String(hub.version).replace(/^v/, '')}` : 'v1.4.15';
// 从全局 store 获取筛选状态
const selectedFormats = filters.formats || [];
+1 -1
View File
@@ -58,7 +58,7 @@ const ImageCell = ({
height: `${image.calculatedHeight}px`
}}
onClick={(e) => onImageClick(image, e, flatIndex)}
onDoubleClick={() => onImageDoubleClick(image, flatIndex)}
onDoubleClick={(e) => { e.preventDefault(); onImageDoubleClick(image, flatIndex); }}
onContextMenu={(e) => onContextMenu(e, image)}
draggable={true}
onDragStart={(e) => onDragStart(e, image)}
+1 -1
View File
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { X, ScanText, Info, Save, FlaskConical, Github, ExternalLink, Wand2, Film } from 'lucide-react';
import { settingsAPI, aigenAPI } from '../api';
const APP_VERSION = 'v1.4.14';
const APP_VERSION = 'v1.4.15';
const REPO_URL = 'https://gitea.88531.cn/jinghui/flypic';
/**