feat: the site's third-round corrections on acceptance, DPI and the final file
Residue and thin strokes can be accepted on ready sheets and loose art, with the consent and its time kept on the order. The resolution rule is 96/200 DPI, and a final file must be a transparent 300 DPI PNG. The art score leaves the customer's cart and buy box (Dropstar, 2026-11-05).
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
// transparente. Só vale para o que o navegador conferiu. O resíduo que o
|
||||
// cliente aceita imprimir (Dropstar, 29/10/2026: às vezes os pontos são da
|
||||
// arte) não barra; o fundo chapado barra sempre.
|
||||
// A folha pronta não aceita resíduo (Dropstar, 03/11/2026): só a arte avulsa.
|
||||
const residuoAceito=()=>false;
|
||||
const residuoAceito=x=>!!x.residuoAceito;
|
||||
const folhaBarrada=x=>!!(x.an && !x.an.grande && (x.an.fundoChapado || (x.an.residuos && !residuoAceito(x))));
|
||||
// Quantos pontos o cliente aceitou imprimir, somadas as folhas: vai no item.
|
||||
// the sheet of loose art inherits what each artwork accepted
|
||||
@@ -37,12 +36,11 @@ function perguntaMista(){
|
||||
const lista=ehFolha()?folhas:artes;
|
||||
const x=lista.find(y=>!y.mistaVista && mista(tracoDoArquivo(y)));
|
||||
if(!x) return;
|
||||
x.mistaVista=true;
|
||||
$('mistaTit').textContent=x.f.name;
|
||||
$('mistaTxt').textContent=ehFolha()?TEXTO_MISTA.folha:TEXTO_MISTA.arte;
|
||||
$('mistaSep').onclick=()=>{ dlg.close(); const i=lista.indexOf(x);
|
||||
if(i>=0){ lista.splice(i,1); ehFolha()?pintaFolha():pintaArtes(); } $('inp').click(); };
|
||||
$('mistaSegue').onclick=()=>{ dlg.close(); agendaAvaliacao(); };
|
||||
$('mistaSegue').onclick=()=>{ x.mistaVista=true; dlg.close(); agendaAvaliacao(); };
|
||||
dlg.showModal();
|
||||
}
|
||||
// O traço mais fino do item (item 9, Dropstar 30/10/2026): o menor entre as
|
||||
@@ -50,12 +48,13 @@ function perguntaMista(){
|
||||
// que confere a classe de contração ao aprovar o arquivo final.
|
||||
function tracoDoItem(lista){
|
||||
const arquivos=lista||(ehFolha()?folhas:artes);
|
||||
const medidas=arquivos.map(x=>lista?tracoDaArte(x):tracoDoArquivo(x)).filter(Boolean);
|
||||
const medidas=arquivos.map((x,index)=>({index,traco:lista?tracoDaArte(x):tracoDoArquivo(x)})).filter(x=>x.traco);
|
||||
if(!medidas.length) return {strokePx:null, strokeClass:null, strokeChoice:null};
|
||||
const fino=medidas.reduce((a,b)=>b.px<a.px?b:a);
|
||||
const fino=medidas.reduce((a,b)=>b.traco.px<a.traco.px?b:a);
|
||||
// Avisado do item 16, o cliente quis imprimir assim: fica a medida, C1.
|
||||
const avisado=arquivos.some(x=>x.mistaVista && mista(lista?tracoDaArte(x):tracoDoArquivo(x)));
|
||||
return {strokePx:fino.px, strokeClass:fino.classe, strokeChoice:avisado?'measured':null};
|
||||
return {strokePx:fino.traco.px, strokeClass:fino.traco.classe, strokeChoice:avisado?'measured':null,
|
||||
proofSourceIndex:fino.index, proofYFraction:fino.traco.proofYFraction||0};
|
||||
}
|
||||
// Avalia sozinho conforme o cliente sobe e preenche. Devolve o que ainda falta,
|
||||
// para a fila dizer em texto em vez de travar num botão.
|
||||
@@ -78,7 +77,7 @@ function avaliar(){
|
||||
if(barrada) return {pronto:false, falta:barrada.an.fundoChapado
|
||||
? barrada.f.name+' está sem fundo transparente. Exporte a folha com fundo transparente, em PNG ou PDF, e envie de novo.'
|
||||
: barrada.f.name+' tem '+barrada.an.residuos+' ponto'+(barrada.an.residuos>1?'s':'')+
|
||||
' de recorte. Apague e envie de novo.'};
|
||||
' de recorte. Apague e envie de novo, ou marque que aceita imprimir assim.'};
|
||||
metros=folhaTotalM();
|
||||
setTimeout(perguntaMista);
|
||||
reencaixado=false;
|
||||
@@ -145,7 +144,7 @@ function avaliar(){
|
||||
// metragem = altura da folha depois de montada, com os 5 mm entre peças
|
||||
metros=+(montagemCm/100).toFixed(4);
|
||||
if(!(metros>0)) return {pronto:false, falta:'Montando a folha…'};
|
||||
const notas=artes.map(a=>Math.max(6,Math.min(100,Math.round(dpiDe(a)/300*100))));
|
||||
const notas=artes.map(a=>Math.max(6,Math.min(100,Math.round(dpiDe(a)/DPI_AVISA*100))));
|
||||
const media=Math.round(notas.reduce((s,n)=>s+n,0)/notas.length), pior=Math.min(...notas);
|
||||
mostraNota([
|
||||
['ok','Montagem por nossa conta','5 mm garantidos'],
|
||||
@@ -211,7 +210,7 @@ function ressalvaResolucao(){
|
||||
quantas:r.quantasBaixas, parte:Math.round(r.fracBaixa*100),
|
||||
quantasAviso:r.quantasAviso, parteAviso:Math.round(r.fracAviso*100)} : {};
|
||||
if(x.an.dpi<DPI_RECUSA) recusadas.push(Object.assign({nome, dpi:x.an.dpi, cm}, extra));
|
||||
else if(x.an.dpi<DPI_AVISA || (r&&r.quantasAviso))
|
||||
else if(x.an.dpi<DPI_AVISA)
|
||||
baixas.push(Object.assign({nome, dpi:x.an.dpi, cm}, extra));
|
||||
});
|
||||
geral = folhas.some(x=>x.an) ? Math.max(...folhas.filter(x=>x.an).map(x=>x.an.dpi)) : 300;
|
||||
|
||||
Reference in New Issue
Block a user