feat: a real progress bar per file while it uploads (Dropstar's third round, item 6)
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 3m42s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 56s

A file starts uploading as soon as it is on the product page, not once
the item is in the cart. Under the uploader, each file has its row:
"Enviando NOME · 62% · 1,2 MB de 2,0 MB", then the security check, then
"enviado"; a failure says why, with "Tentar de novo". Each part goes
through XMLHttpRequest, so the bytes move while a part is on its way
instead of once per 8 MB part. A file taken off the page, and in no cart
item, stops uploading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-29 18:18:56 -03:00
parent 95e7c64501
commit a5417d200e
8 changed files with 104 additions and 15 deletions

View File

@@ -381,6 +381,17 @@ html:is([data-rota="pagamento"],[data-rota="pix"]) .pagGrid{display:grid;grid-te
.envioBarra{height:6px;border-radius:999px;background:#EDEDED;overflow:hidden;margin-bottom:6px}
.envioBarra i{display:block;height:100%;background:var(--laranja);border-radius:999px;transition:width .4s}
.cartEnvio{font-size:15px;font-weight:700;color:var(--laranja-escuro);margin-left:6px}
/* Each file's upload under the uploader (Dropstar, 2026-10-29). */
.envios{display:flex;flex-direction:column;gap:8px;margin:0 0 14px}
.envios:empty{display:none}
.envio{padding:12px 14px;border:1px solid #CFE9D8;border-radius:12px;background:#F2FBF5;font-size:15px;line-height:1.4;color:var(--preto);overflow-wrap:anywhere}
.envio span{display:block;margin-bottom:8px}
.envio .envioBarra{height:12px;margin:0;background:#DDEFE3}
.envio .envioBarra i{background:var(--verde-ml)}
.envio.ok{display:flex;align-items:center;gap:8px;color:#00753A}
.envio.erro{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;border-color:#F4C7C1;background:#FDE8E6;color:#B3261E}
.envio.ok span,.envio.erro span{margin:0}
.envio.erro button{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
.cartEnvio:empty{display:none}
.envioArq:empty{display:none}
.pagCab{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:20px}