@gallop.software/studio 2.3.62 → 2.3.64
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/client/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-pIYJJxxv.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -544,6 +544,7 @@ async function handleList(request) {
|
|
|
544
544
|
isProtected: true,
|
|
545
545
|
cdnPushed: isPushedToCloud,
|
|
546
546
|
cdnBaseUrl,
|
|
547
|
+
isCloud: isPushedToCloud && !isRemote,
|
|
547
548
|
isRemote,
|
|
548
549
|
dimensions
|
|
549
550
|
});
|
|
@@ -598,6 +599,7 @@ async function handleList(request) {
|
|
|
598
599
|
isProtected: true,
|
|
599
600
|
cdnPushed: isPushedToCloud,
|
|
600
601
|
cdnBaseUrl,
|
|
602
|
+
isCloud: isPushedToCloud && !isRemote,
|
|
601
603
|
isRemote,
|
|
602
604
|
dimensions
|
|
603
605
|
});
|
|
@@ -826,6 +828,7 @@ async function handleList(request) {
|
|
|
826
828
|
hasFull: !!entry.f,
|
|
827
829
|
cdnPushed: isPushedToCloud,
|
|
828
830
|
cdnBaseUrl: fileCdnUrl,
|
|
831
|
+
isCloud: isPushedToCloud && !isRemote,
|
|
829
832
|
isRemote,
|
|
830
833
|
isProtected: isInsideImagesFolder,
|
|
831
834
|
dimensions: entry.o ? { width: entry.o.w, height: entry.o.h } : void 0,
|
|
@@ -904,6 +907,7 @@ async function handleSearch(request) {
|
|
|
904
907
|
hasFull: !!entry.f,
|
|
905
908
|
cdnPushed: isPushedToCloud,
|
|
906
909
|
cdnBaseUrl: fileCdnUrl,
|
|
910
|
+
isCloud: isPushedToCloud && !isRemote,
|
|
907
911
|
isRemote,
|
|
908
912
|
dimensions: entry.o ? { width: entry.o.w, height: entry.o.h } : void 0,
|
|
909
913
|
hasUpdate: entry.u === 1
|
|
@@ -3459,17 +3463,21 @@ async function handleImportUrls(request) {
|
|
|
3459
3463
|
const stream = new ReadableStream({
|
|
3460
3464
|
async start(controller) {
|
|
3461
3465
|
const sendEvent = (data) => {
|
|
3462
|
-
|
|
3466
|
+
try {
|
|
3467
|
+
controller.enqueue(encoder.encode(`data: ${JSON.stringify(data)}
|
|
3463
3468
|
|
|
3464
3469
|
`));
|
|
3470
|
+
} catch {
|
|
3471
|
+
}
|
|
3465
3472
|
};
|
|
3466
3473
|
try {
|
|
3467
|
-
const { urls } = await request.json();
|
|
3474
|
+
const { urls, operationId } = await request.json();
|
|
3468
3475
|
if (!urls || !Array.isArray(urls) || urls.length === 0) {
|
|
3469
3476
|
sendEvent({ type: "error", message: "No URLs provided" });
|
|
3470
3477
|
controller.close();
|
|
3471
3478
|
return;
|
|
3472
3479
|
}
|
|
3480
|
+
const isCancelled = () => operationId ? isOperationCancelled(operationId) : false;
|
|
3473
3481
|
const meta = await loadMeta();
|
|
3474
3482
|
const added = [];
|
|
3475
3483
|
const skipped = [];
|
|
@@ -3477,6 +3485,20 @@ async function handleImportUrls(request) {
|
|
|
3477
3485
|
const total = urls.length;
|
|
3478
3486
|
sendEvent({ type: "start", total });
|
|
3479
3487
|
for (let i = 0; i < urls.length; i++) {
|
|
3488
|
+
if (isCancelled()) {
|
|
3489
|
+
await saveMeta(meta);
|
|
3490
|
+
if (operationId) clearCancelledOperation(operationId);
|
|
3491
|
+
sendEvent({
|
|
3492
|
+
type: "complete",
|
|
3493
|
+
added: added.length,
|
|
3494
|
+
skipped: skipped.length,
|
|
3495
|
+
errors: errors.length,
|
|
3496
|
+
message: `Stopped. Imported ${added.length} URL${added.length !== 1 ? "s" : ""}.`,
|
|
3497
|
+
cancelled: true
|
|
3498
|
+
});
|
|
3499
|
+
controller.close();
|
|
3500
|
+
return;
|
|
3501
|
+
}
|
|
3480
3502
|
const url = urls[i].trim();
|
|
3481
3503
|
if (!url) continue;
|
|
3482
3504
|
try {
|
|
@@ -3501,6 +3523,7 @@ async function handleImportUrls(request) {
|
|
|
3501
3523
|
b: imageData.b,
|
|
3502
3524
|
c: cdnIndex
|
|
3503
3525
|
});
|
|
3526
|
+
await saveMeta(meta);
|
|
3504
3527
|
added.push(path10);
|
|
3505
3528
|
sendEvent({
|
|
3506
3529
|
type: "progress",
|
|
@@ -3524,6 +3547,7 @@ async function handleImportUrls(request) {
|
|
|
3524
3547
|
}
|
|
3525
3548
|
}
|
|
3526
3549
|
await saveMeta(meta);
|
|
3550
|
+
if (operationId) clearCancelledOperation(operationId);
|
|
3527
3551
|
sendEvent({
|
|
3528
3552
|
type: "complete",
|
|
3529
3553
|
added: added.length,
|