@gallop.software/studio 0.1.87 → 0.1.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{StudioUI-6HTM3QHM.mjs → StudioUI-6CQ7MX7R.mjs} +57 -23
- package/dist/StudioUI-6CQ7MX7R.mjs.map +1 -0
- package/dist/{StudioUI-ZBSTYTUV.js → StudioUI-Y35A2T7S.js} +58 -24
- package/dist/StudioUI-Y35A2T7S.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/StudioUI-6HTM3QHM.mjs.map +0 -1
- package/dist/StudioUI-ZBSTYTUV.js.map +0 -1
|
@@ -310,6 +310,23 @@ var progressStyles = {
|
|
|
310
310
|
white-space: nowrap;
|
|
311
311
|
overflow: hidden;
|
|
312
312
|
text-overflow: ellipsis;
|
|
313
|
+
`,
|
|
314
|
+
errorList: css`
|
|
315
|
+
margin-top: 12px;
|
|
316
|
+
padding: 12px;
|
|
317
|
+
background: #fef2f2;
|
|
318
|
+
border: 1px solid #fecaca;
|
|
319
|
+
border-radius: 6px;
|
|
320
|
+
max-height: 200px;
|
|
321
|
+
overflow-y: auto;
|
|
322
|
+
`,
|
|
323
|
+
errorItem: css`
|
|
324
|
+
font-size: ${fontSize.xs};
|
|
325
|
+
color: #991b1b;
|
|
326
|
+
margin: 0 0 4px;
|
|
327
|
+
&:last-child {
|
|
328
|
+
margin-bottom: 0;
|
|
329
|
+
}
|
|
313
330
|
`
|
|
314
331
|
};
|
|
315
332
|
function ProgressModal({
|
|
@@ -331,26 +348,36 @@ function ProgressModal({
|
|
|
331
348
|
" image",
|
|
332
349
|
(progress.processed ?? progress.current) !== 1 ? "s" : "",
|
|
333
350
|
" before stopping."
|
|
334
|
-
] }) : isComplete ? /* @__PURE__ */ jsxs(
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
351
|
+
] }) : isComplete ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
352
|
+
/* @__PURE__ */ jsxs("p", { css: styles.message, children: [
|
|
353
|
+
"Processed ",
|
|
354
|
+
progress.processed,
|
|
355
|
+
" image",
|
|
356
|
+
progress.processed !== 1 ? "s" : "",
|
|
357
|
+
".",
|
|
358
|
+
progress.orphansRemoved !== void 0 && progress.orphansRemoved > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
359
|
+
" Removed ",
|
|
360
|
+
progress.orphansRemoved,
|
|
361
|
+
" orphaned thumbnail",
|
|
362
|
+
progress.orphansRemoved !== 1 ? "s" : "",
|
|
363
|
+
"."
|
|
364
|
+
] }) : null,
|
|
365
|
+
progress.errors !== void 0 && progress.errors > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
366
|
+
" ",
|
|
367
|
+
progress.errors,
|
|
368
|
+
" error",
|
|
369
|
+
progress.errors !== 1 ? "s" : "",
|
|
370
|
+
" occurred."
|
|
371
|
+
] }) : null
|
|
372
|
+
] }),
|
|
373
|
+
progress.errorMessages && progress.errorMessages.length > 0 && /* @__PURE__ */ jsxs("div", { css: progressStyles.errorList, children: [
|
|
374
|
+
progress.errorMessages.slice(0, 10).map((msg, i) => /* @__PURE__ */ jsx("p", { css: progressStyles.errorItem, children: msg }, i)),
|
|
375
|
+
progress.errorMessages.length > 10 && /* @__PURE__ */ jsxs("p", { css: progressStyles.errorItem, children: [
|
|
376
|
+
"...and ",
|
|
377
|
+
progress.errorMessages.length - 10,
|
|
378
|
+
" more"
|
|
379
|
+
] })
|
|
380
|
+
] })
|
|
354
381
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
355
382
|
/* @__PURE__ */ jsx("p", { css: styles.message, children: progress.status === "cleanup" ? "Cleaning up orphaned files..." : `Processing images...` }),
|
|
356
383
|
/* @__PURE__ */ jsxs("div", { css: progressStyles.progressContainer, children: [
|
|
@@ -1704,6 +1731,7 @@ function StudioToolbar() {
|
|
|
1704
1731
|
setShowProgress(true);
|
|
1705
1732
|
let synced = 0;
|
|
1706
1733
|
let errors = 0;
|
|
1734
|
+
const errorMessages = [];
|
|
1707
1735
|
try {
|
|
1708
1736
|
for (let i = 0; i < imageKeys.length; i++) {
|
|
1709
1737
|
const imageKey = imageKeys[i];
|
|
@@ -1728,13 +1756,18 @@ function StudioToolbar() {
|
|
|
1728
1756
|
return;
|
|
1729
1757
|
}
|
|
1730
1758
|
errors++;
|
|
1759
|
+
errorMessages.push(data.error || `Failed: ${imageKey}`);
|
|
1731
1760
|
} else if (data.synced?.length > 0) {
|
|
1732
1761
|
synced++;
|
|
1733
1762
|
} else if (data.errors?.length > 0) {
|
|
1734
1763
|
errors++;
|
|
1764
|
+
for (const errMsg of data.errors) {
|
|
1765
|
+
errorMessages.push(errMsg);
|
|
1766
|
+
}
|
|
1735
1767
|
}
|
|
1736
|
-
} catch {
|
|
1768
|
+
} catch (err) {
|
|
1737
1769
|
errors++;
|
|
1770
|
+
errorMessages.push(`Network error: ${imageKey}`);
|
|
1738
1771
|
}
|
|
1739
1772
|
}
|
|
1740
1773
|
setProgressState({
|
|
@@ -1743,7 +1776,8 @@ function StudioToolbar() {
|
|
|
1743
1776
|
percent: 100,
|
|
1744
1777
|
status: "complete",
|
|
1745
1778
|
processed: synced,
|
|
1746
|
-
errors
|
|
1779
|
+
errors,
|
|
1780
|
+
errorMessages: errorMessages.length > 0 ? errorMessages : void 0
|
|
1747
1781
|
});
|
|
1748
1782
|
clearSelection();
|
|
1749
1783
|
triggerRefresh();
|
|
@@ -4661,4 +4695,4 @@ export {
|
|
|
4661
4695
|
StudioUI,
|
|
4662
4696
|
StudioUI_default as default
|
|
4663
4697
|
};
|
|
4664
|
-
//# sourceMappingURL=StudioUI-
|
|
4698
|
+
//# sourceMappingURL=StudioUI-6CQ7MX7R.mjs.map
|