feat: drhider PDF→DOCX indicator in file list (v1.10)
Deploy contracts-flask / validate (push) Successful in 0s
Deploy contracts-flask / validate (push) Successful in 0s
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
<a href="https://contractor.pythonk8s.services.ngcloud.ru/">Сверка договоров</a>
|
||||
<span class="sep">|</span>
|
||||
<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>
|
||||
</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 remove(i) { files.splice(i, 1); 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' : '';
|
||||
BTN.disabled = !files.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user