From fb4778faed42fcec70418f871709e39b2c8fde3b Mon Sep 17 00:00:00 2001 From: fuzhongyun <15339891972@163.com> Date: Mon, 2 Mar 2026 14:19:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4UI=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/app.js | 19 +++++++++++++++- static/index.html | 58 +++++++++++++++++++++++++++-------------------- static/style.css | 34 +++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 25 deletions(-) diff --git a/static/app.js b/static/app.js index c8e9619..5c132c8 100644 --- a/static/app.js +++ b/static/app.js @@ -9,6 +9,9 @@ fileList: document.getElementById('fileList'), btnClear: document.getElementById('btnClear'), btnStart: document.getElementById('btnStart'), + btnSettings: document.getElementById('btnSettings'), + settingsOverlay: document.getElementById('settingsOverlay'), + btnSettingsClose: document.getElementById('btnSettingsClose'), concurrencyInput: document.getElementById('concurrencyInput'), timeoutInput: document.getElementById('timeoutInput'), progressPercent: document.getElementById('progressPercent'), @@ -255,6 +258,14 @@ setStatus('就绪') } + function openSettings() { + el.settingsOverlay.classList.remove('d-none') + } + + function closeSettings() { + el.settingsOverlay.classList.add('d-none') + } + function setupDropzone() { el.dropzone.addEventListener('click', () => el.fileInput.click()) @@ -285,6 +296,12 @@ renderFileList() }) + el.btnSettings.addEventListener('click', () => openSettings()) + el.btnSettingsClose.addEventListener('click', () => closeSettings()) + el.settingsOverlay.addEventListener('click', (e) => { + if (e.target === el.settingsOverlay) closeSettings() + }) + el.btnStart.addEventListener('click', async () => { clearError() if (!state.files.length) return @@ -304,6 +321,7 @@ setView('progress') setStatus('处理中') openSSE(state.taskID) + closeSettings() } catch (e) { showError(e.message || '处理失败') setStatus('出错') @@ -366,4 +384,3 @@ setupDropzone() resetAll() })() - diff --git a/static/index.html b/static/index.html index de03955..65aa836 100644 --- a/static/index.html +++ b/static/index.html @@ -8,7 +8,7 @@
-