@gallop.software/studio 0.1.113 → 0.1.115

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.
@@ -2396,9 +2396,9 @@ function StudioToolbar() {
2396
2396
  }
2397
2397
  }, [setSearchQuery]);
2398
2398
  const hasSelection = selectedItems.size > 0;
2399
- const hasCloudSelection = hasSelection && Array.from(selectedItems).some((path) => {
2399
+ const hasR2Selection = hasSelection && Array.from(selectedItems).some((path) => {
2400
2400
  const item = fileItems.find((f) => f.path === path);
2401
- return item && item.cdnPushed;
2401
+ return item && item.cdnPushed && !item.isRemote;
2402
2402
  });
2403
2403
  const selectedPaths = Array.from(selectedItems);
2404
2404
  const singleFolderSelected = selectedPaths.length === 1 && !selectedPaths[0].includes(".");
@@ -2440,8 +2440,8 @@ function StudioToolbar() {
2440
2440
  ConfirmModal,
2441
2441
  {
2442
2442
  title: "Push to CDN",
2443
- message: `Push ${syncImageCount} image${syncImageCount !== 1 ? "s" : ""} to Cloudflare R2? Images must be processed first. After pushing, local files will be deleted.`,
2444
- confirmLabel: "Sync",
2443
+ message: `Push ${syncImageCount} image${syncImageCount !== 1 ? "s" : ""} to Cloudflare R2? Local images must be processed first. Remote images will be downloaded first. After pushing, local files will be deleted.`,
2444
+ confirmLabel: "Push",
2445
2445
  onConfirm: handleSyncConfirm,
2446
2446
  onCancel: () => setShowSyncConfirm(false)
2447
2447
  }
@@ -2615,8 +2615,8 @@ function StudioToolbar() {
2615
2615
  {
2616
2616
  css: styles5.btn,
2617
2617
  onClick: handleSyncClick,
2618
- disabled: !hasSelection || hasCloudSelection,
2619
- title: hasCloudSelection ? "Selected files are already in the cloud" : void 0,
2618
+ disabled: !hasSelection || hasR2Selection,
2619
+ title: hasR2Selection ? "Selected files are already in R2" : void 0,
2620
2620
  children: [
2621
2621
  /* @__PURE__ */ jsx5(CloudIcon, {}),
2622
2622
  "Push CDN"
@@ -4463,16 +4463,16 @@ function StudioDetailView() {
4463
4463
  setShowR2SetupModal(true);
4464
4464
  } else {
4465
4465
  setAlertMessage({
4466
- title: "Sync Failed",
4467
- message: data.error || "Failed to sync to CDN."
4466
+ title: "Push Failed",
4467
+ message: data.error || "Failed to push to CDN."
4468
4468
  });
4469
4469
  }
4470
4470
  }
4471
4471
  } catch (error) {
4472
- console.error("Sync error:", error);
4472
+ console.error("Push error:", error);
4473
4473
  setAlertMessage({
4474
- title: "Sync Failed",
4475
- message: "Failed to sync to CDN. Check console for details."
4474
+ title: "Push Failed",
4475
+ message: "Failed to push to CDN. Check console for details."
4476
4476
  });
4477
4477
  } finally {
4478
4478
  setPushing(false);
@@ -4688,8 +4688,8 @@ function StudioDetailView() {
4688
4688
  {
4689
4689
  css: styles8.actionBtn,
4690
4690
  onClick: handleSync,
4691
- disabled: pushing || focusedItem.cdnPushed,
4692
- title: focusedItem.cdnPushed ? "Already in cloud" : void 0,
4691
+ disabled: pushing || focusedItem.cdnPushed && !focusedItem.isRemote,
4692
+ title: focusedItem.cdnPushed && !focusedItem.isRemote ? "Already in R2" : void 0,
4693
4693
  children: [
4694
4694
  /* @__PURE__ */ jsx8("svg", { css: styles8.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) }),
4695
4695
  pushing ? "Pushing..." : "Push to CDN"
@@ -4701,8 +4701,6 @@ function StudioDetailView() {
4701
4701
  {
4702
4702
  css: styles8.actionBtn,
4703
4703
  onClick: () => setShowProcessConfirm(true),
4704
- disabled: focusedItem.isRemote,
4705
- title: focusedItem.isRemote ? "Cannot process remote images" : void 0,
4706
4704
  children: [
4707
4705
  /* @__PURE__ */ jsx8("svg", { css: styles8.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
4708
4706
  "Process Image"
@@ -5682,4 +5680,4 @@ export {
5682
5680
  StudioUI,
5683
5681
  StudioUI_default as default
5684
5682
  };
5685
- //# sourceMappingURL=StudioUI-LGRI3HCE.mjs.map
5683
+ //# sourceMappingURL=StudioUI-73XFVFV4.mjs.map