pdf: white 9pt document-style print CSS, download named after report title; ui tweaks
This commit is contained in:
+5
-2
@@ -77,8 +77,11 @@ const sel={};
|
||||
// Mini modal with the secondary actions of one recording: rerun from step, drop video, delete.
|
||||
function more(name,mb,label,canDrop,title,canRetitle,blocked){
|
||||
mbody.innerHTML=`<b>${label}</b><button onclick="who('${name}')">👥 partecipanti</button><button onclick="mclose();spk('${name}')">speakers</button><button onclick="mclose();setTitle('${name}','${title}')">✎ modifica titolo</button>`+(canRetitle?`<button onclick="mclose();retitle('${name}')">↻ ricalcola titolo</button>`:"")+(mb?`<button ${blocked?"disabled":""} onclick="mclose();reprocess('${name}')">↻ riprocessa</button>`:"")+
|
||||
`<button onclick="mclose();reveal('${name}')">📂 mostra su disco</button>`+
|
||||
(canDrop&&!blocked?`<button onclick="mclose();dropVid('${name}',${mb})">🎞 elimina video</button>`:"")+
|
||||
(blocked?"":`<button class=del onclick="mclose();del_('${name}','${label}')">🗑 elimina riunione</button>`)+`<button onclick="mclose()">✕ chiudi</button>`;mdlg.showModal()}
|
||||
// Ask the server to open the meeting folder in Explorer.
|
||||
async function reveal(name){const response=await fetch("/reveal?name="+name,{method:"POST"});if(!response.ok)alert(await response.text())}
|
||||
// Participants: named speakers (unnamed labels shown as-is) with talk time, in the same modal.
|
||||
async function who(name){const data=await (await fetch("/speakers?name="+name)).json();
|
||||
mbody.innerHTML=`<b>Partecipanti</b>`+(data.rows.map(row=>`<div>${E(row.person||row.label)} <small>${fmt(row.talk_s)}</small></div>`).join("")||"<div>nessun dato</div>")+`<button onclick="mclose()">✕ chiudi</button>`}
|
||||
@@ -215,7 +218,7 @@ qs.textContent=data.queue?`rielaborazione: ${data.queue} da completare`:"";
|
||||
// Remember step-select values so they survive the re-render.
|
||||
document.querySelectorAll("select[id^=f-]").forEach(select=>sel[select.id]=select.value);
|
||||
// Table header.
|
||||
let html="<thead><tr><th>riunione<th>stato<th>durata<th>speaker<th>MB<th>azioni</tr></thead>";
|
||||
let html="<thead><tr><th>riunione<th>stato<th>durata<th>speaker<th>dimensione<th>azioni</tr></thead>";
|
||||
// Pagination: PS meetings per page; clamp the page if recordings were removed, then draw the pager.
|
||||
const pages=Math.max(1,Math.ceil(data.recs.length/PS));if(pg_>=pages)pg_=pages-1;
|
||||
pgr.innerHTML=pages>1?`<button ${pg_?"":"disabled"} onclick="goPg(-1)">‹</button><span>pagina ${pg_+1} di ${pages} (${data.recs.length} riunioni)</span><button ${pg_<pages-1?"":"disabled"} onclick="goPg(1)">›</button>`:"";
|
||||
@@ -224,7 +227,7 @@ for(const row of data.recs.slice(pg_*PS,(pg_+1)*PS)){
|
||||
// Display title, falling back to the upload name.
|
||||
const nm=row.title||row.upload,act=!!(row.prog||row.running||row.status==="queued");
|
||||
// Main row: checkbox, title and rename buttons; status badge with error text and time since last data.
|
||||
html+=`<tbody class=rec><tr class=main><td><input type=checkbox class=mg value="${row.name}"><span class="ttl${act?" act":""}"${act?` onclick="togPg('${row.name}')" title="mostra/nascondi avanzamento"`:""}>${nm?`<b>${E(nm)}</b>${act?"<span class=spin></span>":""}<br><small>${row.name}</small>`:row.name+(act?"<span class=spin></span>":"")}</span><td><span class="b ${row.status}" title="${E(row.error)}">${row.status}</span>${row.receiving_age_s!=null&&row.status==="recording"?` <small>${row.receiving_age_s}s ago</small>`:""}${row.error?`<br><small>${E(row.error)}</small>`:""}<td>${row.duration_s?fmt(row.duration_s):""}<td>${row.speakers??""}<td>${row.mb}
|
||||
html+=`<tbody class=rec><tr class=main><td><input type=checkbox class=mg value="${row.name}"><span class="ttl${act?" act":""}"${act?` onclick="togPg('${row.name}')" title="mostra/nascondi avanzamento"`:""}>${nm?`<b>${E(nm)}</b>${act?"<span class=spin></span>":""}<br><small>${row.name}</small>`:row.name+(act?"<span class=spin></span>":"")}</span><td><span class="b ${row.status}" title="${E(row.error)}">${row.status}</span>${row.receiving_age_s!=null&&row.status==="recording"?` <small>${row.receiving_age_s}s ago</small>`:""}${row.error?`<br><small>${E(row.error)}</small>`:""}<td>${row.duration_s?fmt(row.duration_s):""}<td>${row.speakers??""}<td>${row.mb?row.mb+" MB":""}
|
||||
<td><div class=acts><a class="btn pri"${row.files.includes("report.html")?` href="/report?name=${row.name}" target=_blank`:""}>📄 report</a><a class=btn${row.files.includes("report.html")?` href="/pdf?name=${row.name}" target=_blank`:""}>pdf</a><button title="anteprima e ritaglio" ${row.mb?"":"disabled"} onclick="play('${row.name}',${row.duration_s||0},'${E(nm||row.name).replace(/'/g,"")}')">▶ video</button><button title="altre azioni" onclick="more('${row.name}',${row.mb||0},'${E(nm||row.name).replace(/'/g,"")}',${!!(row.mb&&row.status==="done"&&!row.running)},'${E(row.title||row.upload||"").replace(/'/g,"")}',${!!(row.mb&&row.files.includes("report.html"))},${!!(row.running||row.status==="queued"||row.status==="recording")})">⋯</button></div>`;
|
||||
html+=pgo.has(row.name)?progPanel(row):"";
|
||||
if(open_.has(row.name))html+=await panel(row.name);html+="</tbody>"}
|
||||
|
||||
Reference in New Issue
Block a user