From a204d0c04aecb1ffd5524a51caa3fc67c4737a7a Mon Sep 17 00:00:00 2001 From: XianYuDaXian Date: Sat, 14 Mar 2026 09:00:46 +0800 Subject: [PATCH] =?UTF-8?q?ux:=20=E6=89=B9=E9=87=8F=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=8D=A2=E5=A4=9A=E5=B1=82=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=EF=BC=8C=E5=90=88=E5=B9=B6=E8=A7=86=E9=A2=91=E5=BC=80=E5=A7=8B?= =?UTF-8?q?/=E5=81=9C=E6=AD=A2=E6=8C=89=E9=92=AE=EF=BC=8C=E5=BB=B6?= =?UTF-8?q?=E9=95=BF=E6=BB=9A=E5=8A=A8=E9=98=88=E5=80=BC=E8=B0=83=E8=87=B3?= =?UTF-8?q?0.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/public/js/video.js | 34 +++++++++++++++++----------- app/static/public/pages/imagine.html | 11 +++++---- app/static/public/pages/video.html | 15 +++++------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/app/static/public/js/video.js b/app/static/public/js/video.js index 5b7cda4..c5f94c9 100644 --- a/app/static/public/js/video.js +++ b/app/static/public/js/video.js @@ -3211,12 +3211,12 @@ // ── 按钮代理:点击 sticky bar 按钮 = 点击原始按钮 ── if (mobileStart) { mobileStart.addEventListener('click', () => { - if (startBtn && !startBtn.disabled) startBtn.click(); - }); - } - if (mobileStop) { - mobileStop.addEventListener('click', () => { - if (stopBtn && !stopBtn.disabled) stopBtn.click(); + const running = stopBtn && !stopBtn.classList.contains('hidden'); + if (running) { + if (stopBtn && !stopBtn.disabled) stopBtn.click(); + } else { + if (startBtn && !startBtn.disabled) startBtn.click(); + } }); } if (mobileSplice) { @@ -3225,14 +3225,22 @@ }); } - // ── 同步生成按钮状态(running / idle)到 sticky bar ── + // ── 同步生成按钮状态(running / idle)到一体切换按钮 ── function syncGenerateSlotState() { - if (!slotGenerate || !mobileStart || !mobileStop) return; + if (!mobileStart) return; const running = stopBtn && !stopBtn.classList.contains('hidden'); - mobileStop.classList.toggle('hidden', !running); - mobileStart.classList.toggle('hidden', running); - slotGenerate.classList.toggle('is-running', running); - if (mobileStart) mobileStart.disabled = Boolean(startBtn && startBtn.disabled); + // 切换图标 + const playIcon = mobileStart.querySelector('.mobile-gen-play'); + const stopIcon = mobileStart.querySelector('.mobile-gen-stop'); + const label = mobileStart.querySelector('.mobile-gen-label'); + if (playIcon) playIcon.style.display = running ? 'none' : ''; + if (stopIcon) stopIcon.style.display = running ? '' : 'none'; + if (label) label.textContent = running ? '停止' : '开始生成'; + // 切换样式:running 时改为 outline 风格 + mobileStart.className = running + ? 'geist-button-outline mobile-action-btn gap-2' + : 'geist-button mobile-action-btn gap-2'; + mobileStart.disabled = !running && Boolean(startBtn && startBtn.disabled); } if (startBtn || stopBtn) { @@ -3253,7 +3261,7 @@ if (slotGenerate) slotGenerate.classList.toggle('mobile-action-slot--active', !spliceVisible); if (slotSplice) slotSplice.classList.toggle('mobile-action-slot--active', spliceVisible); }, - { threshold: 0.15 } + { threshold: 0.7 } ); io.observe(targetPanel); } diff --git a/app/static/public/pages/imagine.html b/app/static/public/pages/imagine.html index 4db39b6..026eaee 100644 --- a/app/static/public/pages/imagine.html +++ b/app/static/public/pages/imagine.html @@ -19,7 +19,7 @@ - + @@ -299,12 +299,13 @@ - - diff --git a/app/static/public/pages/video.html b/app/static/public/pages/video.html index ffd7a78..b959faa 100644 --- a/app/static/public/pages/video.html +++ b/app/static/public/pages/video.html @@ -313,21 +313,18 @@
- +
-
@@ -354,7 +351,7 @@ - +