From 62c7ea01629a78cd4ef3b1fb11f2f07b6d3c422a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sun, 12 Jul 2026 14:19:44 +0400 Subject: [PATCH] =?UTF-8?q?v4.0.2:=20=D0=B1=D0=B5=D0=B3=D1=83=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=81=D0=B5=D0=BA=D1=83=D0=BD=D0=B4=D0=BE=D0=BC=D0=B5?= =?UTF-8?q?=D1=80=20=D0=B2=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B5=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=D0=B0=20(=E2=8F=B3=205?= =?UTF-8?q?=D1=81,=20=E2=8F=B3=206=D1=81...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/app.py | 2 +- site/templates/index.html | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/site/app.py b/site/app.py index 0f6a569..8bda095 100644 --- a/site/app.py +++ b/site/app.py @@ -20,7 +20,7 @@ if _sys_path_root not in sys.path: sys.path.insert(0, _sys_path_root) # Версия приложения (меняется при изменениях) -VERSION = "4.0.1" +VERSION = "4.0.2" def create_app(): diff --git a/site/templates/index.html b/site/templates/index.html index 89d1d57..71c166c 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -163,10 +163,14 @@ async function uploadFiles() { for (let i = 0; i < total; i++) { const f = sf[i], n = i + 1; - ss(i, '⏳'); + const t0 = performance.now(); + // Бегущий секундомер в статусе + const timer = setInterval(() => { + const sec = Math.round((performance.now() - t0) / 1000); + ss(i, '⏳ ' + sec + 'с'); + }, 200); st.className = 'status progress'; st.textContent = 'Файл ' + n + '/' + total + ': ' + f.name; - const t0 = performance.now(); const fd = new FormData(); fd.append('files', f, f.name); try { @@ -180,6 +184,7 @@ async function uploadFiles() { x.ontimeout = () => reject(new Error('Таймаут')); x.send(fd); }); + clearInterval(timer); const el = ((performance.now() - t0) / 1000).toFixed(1); const iz = await JSZip.loadAsync(blob); const ks = Object.keys(iz.files).filter(k => !iz.files[k].dir); @@ -194,6 +199,7 @@ async function uploadFiles() { ss(i, '✓ ' + el + 'с'); ok++; } catch (err) { + clearInterval(timer); ss(i, ''); fail++; }