feat: drhider PDF→DOCX indicator in file list (v1.10)
Deploy contracts-flask / validate (push) Successful in 0s

This commit is contained in:
2026-07-07 16:23:57 +04:00
parent 211f391c6c
commit 42855fe9b3
+8 -2
View File
@@ -84,7 +84,7 @@
<a href="https://contractor.pythonk8s.services.ngcloud.ru/">Сверка договоров</a> <a href="https://contractor.pythonk8s.services.ngcloud.ru/">Сверка договоров</a>
<span class="sep">|</span> <span class="sep">|</span>
<strong>DrHider</strong> <strong>DrHider</strong>
<span style="font-size:11px;color:var(--muted);">v1.9</span> <span style="font-size:11px;color:var(--muted);">v1.10</span>
<button class="help-btn" onclick="openModal()" title="О сервисе">?</button> <button class="help-btn" onclick="openModal()" title="О сервисе">?</button>
</header> </header>
@@ -204,7 +204,13 @@ DZ.ondrop = e => { e.preventDefault(); DZ.classList.remove('active'); addFiles(e
function addFiles(fl) { for (let f of fl) { if (files.find(x => x.name===f.name && x.size===f.size)) continue; files.push(f); } render(); } function addFiles(fl) { for (let f of fl) { if (files.find(x => x.name===f.name && x.size===f.size)) continue; files.push(f); } render(); }
function remove(i) { files.splice(i, 1); render(); } function remove(i) { files.splice(i, 1); render(); }
function render() { function render() {
LIST.innerHTML = files.map((f,i) => `<div class="file-row"><span class="name">${esc(f.name)}</span><span class="size">${fmt(f.size)}</span><span class="remove" onclick="remove(${i})">×</span></div>`).join(''); LIST.innerHTML = files.map((f,i) => {
let display = esc(f.name);
if (f.name.toLowerCase().endsWith('.pdf')) {
display += ' → <span style="color:var(--brand-primary)">' + esc(f.name.slice(0,-4)) + '.docx</span>';
}
return `<div class="file-row"><span class="name">${display}</span><span class="size">${fmt(f.size)}</span><span class="remove" onclick="remove(${i})">×</span></div>`;
}).join('');
LIST.className = files.length ? 'show' : ''; LIST.className = files.length ? 'show' : '';
BTN.disabled = !files.length; BTN.disabled = !files.length;
} }