feat: the preview of a large file says how long is left, not a percentage
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m2s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m0s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m2s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m0s
Reading a large PNG in the browser for its preview showed "gerando a prévia… 87%". It now shows the time left, worked out from how long the reading has taken so far: "faltam cerca de 25 s", "faltam cerca de 3 min", "quase pronto". The bar still fills as it goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -353,7 +353,7 @@ function medirFolha(file){
|
||||
}
|
||||
|
||||
function textoProgresso(x){
|
||||
if(x.med && x.med.grande) return 'gerando a prévia e conferindo a arte… '+x.pct+'%';
|
||||
if(x.med && x.med.grande) return 'gerando a prévia e conferindo a arte · '+faltaLeitura(x.leitura);
|
||||
return x.pct<50?'lendo o arquivo…':x.pct<70?'medindo a folha…':'conferindo a arte…';
|
||||
}
|
||||
// The file card's thumbnail (52 x 96 px, drawn at twice that for sharp screens).
|
||||
@@ -524,7 +524,7 @@ function pintaProgressoArte(a){
|
||||
const el=$('lista').querySelector('[data-arte="'+artes.indexOf(a)+'"]');
|
||||
const barra=el && el.querySelector('.prog i'), texto=el && el.querySelector('.progT');
|
||||
if(!barra){ pintaArtes(); return; }
|
||||
barra.style.width=a.lendo+'%'; if(texto) texto.textContent='arquivo grande · gerando a prévia… '+a.lendo+'%';
|
||||
barra.style.width=a.lendo+'%'; if(texto) texto.textContent='arquivo grande · gerando a prévia · '+faltaLeitura(a.leitura);
|
||||
}
|
||||
function pintaArtes(){
|
||||
invalidaItemAtual();
|
||||
@@ -538,7 +538,7 @@ function pintaArtes(){
|
||||
let barra='', dica='', chips='', aviso='', medida='<b class="pede">Informe a largura</b>';
|
||||
if(a.lendo!=null){
|
||||
barra='<div class="prog"><i style="width:'+a.lendo+'%"></i></div>'+
|
||||
'<span class="progT">arquivo grande · gerando a prévia… '+a.lendo+'%</span>';
|
||||
'<span class="progT">arquivo grande · gerando a prévia · '+faltaLeitura(a.leitura)+'</span>';
|
||||
}else if(a.decodeError){
|
||||
aviso='<p class="avisoF"><b>Não conseguimos ler esta imagem.</b> Exporte novamente em PNG ou JPG.</p>';
|
||||
}else if(a.cm>larguraFilme()){
|
||||
|
||||
Reference in New Issue
Block a user