@gallop.software/studio 0.1.115 → 0.1.116

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.
@@ -1701,6 +1701,8 @@ function StudioToolbar() {
1701
1701
  const [showProcessConfirm, setShowProcessConfirm] = _react.useState.call(void 0, false);
1702
1702
  const [showSyncConfirm, setShowSyncConfirm] = _react.useState.call(void 0, false);
1703
1703
  const [syncImageCount, setSyncImageCount] = _react.useState.call(void 0, 0);
1704
+ const [syncHasRemote, setSyncHasRemote] = _react.useState.call(void 0, false);
1705
+ const [syncHasLocal, setSyncHasLocal] = _react.useState.call(void 0, false);
1704
1706
  const [showProgress, setShowProgress] = _react.useState.call(void 0, false);
1705
1707
  const [progressTitle, setProgressTitle] = _react.useState.call(void 0, "Processing Images");
1706
1708
  const [progressState, setProgressState] = _react.useState.call(void 0, {
@@ -2181,9 +2183,23 @@ function StudioToolbar() {
2181
2183
  });
2182
2184
  return;
2183
2185
  }
2186
+ let hasRemote = false;
2187
+ let hasLocal = false;
2188
+ for (const imgPath of selectedImagePaths) {
2189
+ const item = fileItems.find((f) => f.path === imgPath);
2190
+ if (item) {
2191
+ if (item.isRemote) {
2192
+ hasRemote = true;
2193
+ } else if (!item.cdnPushed) {
2194
+ hasLocal = true;
2195
+ }
2196
+ }
2197
+ }
2184
2198
  setSyncImageCount(selectedImagePaths.length);
2199
+ setSyncHasRemote(hasRemote);
2200
+ setSyncHasLocal(hasLocal);
2185
2201
  setShowSyncConfirm(true);
2186
- }, [selectedItems]);
2202
+ }, [selectedItems, fileItems]);
2187
2203
  const handleSyncConfirm = _react.useCallback.call(void 0, async () => {
2188
2204
  setShowSyncConfirm(false);
2189
2205
  const selectedPaths2 = Array.from(selectedItems);
@@ -2440,7 +2456,7 @@ function StudioToolbar() {
2440
2456
  ConfirmModal,
2441
2457
  {
2442
2458
  title: "Push to CDN",
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.`,
2459
+ message: `Push ${syncImageCount} image${syncImageCount !== 1 ? "s" : ""} to Cloudflare R2?${syncHasRemote ? " Remote images will be downloaded first." : ""}${syncHasLocal ? " After pushing, local files will be deleted." : ""}`,
2444
2460
  confirmLabel: "Push",
2445
2461
  onConfirm: handleSyncConfirm,
2446
2462
  onCancel: () => setShowSyncConfirm(false)
@@ -5680,4 +5696,4 @@ var StudioUI_default = StudioUI;
5680
5696
 
5681
5697
 
5682
5698
  exports.StudioUI = StudioUI; exports.default = StudioUI_default;
5683
- //# sourceMappingURL=StudioUI-OVL65ONP.js.map
5699
+ //# sourceMappingURL=StudioUI-7LIOKKXE.js.map