fix: card pictures load reliably, and the queue button fits its column
A picture had no size until it loaded, and a lazy image with no size may never be loaded, so some cards showed the layout drawing instead. Pictures now take their whole box from the start (object-fit keeps the look). A picture dropped by a re-render while loading no longer counts as missing, which removed it from every later render until a reload. "Baixar todos" spilled out of the Fila de impressão header at 1440 px; it is "Baixar" now, with the full description in its tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -200,7 +200,8 @@ function manifest(production){
|
||||
function artPicture(uid,alt=''){
|
||||
if(!uid||!THUMBS.has(String(uid)))return null;
|
||||
const img=node('img');img.src='/api/operator/uploads/'+uid+'/thumbnail';img.alt=alt;img.loading='lazy';img.decoding='async';
|
||||
img.onerror=()=>{THUMBS.delete(String(uid));img.remove();};
|
||||
// Only a picture still on screen gives up: one dropped by a re-render mid-load is not missing.
|
||||
img.onerror=()=>{if(!img.isConnected)return;THUMBS.delete(String(uid));img.remove();};
|
||||
return img;
|
||||
}
|
||||
// A small box with the first picture of these items; without one, the layout
|
||||
@@ -333,7 +334,7 @@ function renderBoard(){
|
||||
const sub=node('div',undefined,'col-sub');sub.append(node('small',orders.length?metres(total)+' no total':'vazio'));
|
||||
// The print queue's files, all at once, to import into FlexiPRINT.
|
||||
if(state==='fil'&&orders.length){
|
||||
const all=downloadButton('Baixar todos',downloadQueue,'btn ghost small');all.title='Baixar os arquivos finais de todos os pedidos da fila';
|
||||
const all=downloadButton('Baixar',downloadQueue,'btn ghost small');all.title='Baixar os arquivos finais de todos os pedidos da fila';
|
||||
sub.append(all);
|
||||
}
|
||||
head.append(line,sub);
|
||||
|
||||
Reference in New Issue
Block a user