From 274119dfca1ca04a84ed635dd1f7737f34d8e3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 29 Jun 2026 17:43:41 +0400 Subject: [PATCH] fix: nginx timeout 600s, timer in UI, v1.1 --- site/templates/drhider.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/site/templates/drhider.html b/site/templates/drhider.html index 433b8cc..4c4f2be 100644 --- a/site/templates/drhider.html +++ b/site/templates/drhider.html @@ -64,7 +64,7 @@ Сверка договоров | DrHider - v0.9 + v1.1
@@ -129,12 +129,18 @@ BTN.onclick = async () => { const b64 = btoa(String.fromCharCode(...new Uint8Array(buf))); payload.push({name: f.name, data: b64, type: f.type || ''}); } - setStatus('progress', '⏳ Обработка...'); + setStatus('progress', '⏳ Обработка... 0с'); + const startTime = Date.now(); + const timer = setInterval(() => { + const elapsed = Math.round((Date.now() - startTime) / 1000); + setStatus('progress', '⏳ Обработка... ' + elapsed + 'с'); + }, 1000); const r = await fetch('https://contracts.kube5s.ru/api/drhider', { method:'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({files: payload}) }); + clearInterval(timer); if (!r.ok) throw new Error(await r.text()); const blob = await r.blob(); const a = document.createElement('a');