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');