@gallop.software/studio 0.1.90 → 0.1.92
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-LWHNOTSN.mjs → StudioUI-7VQHCHFQ.mjs} +26 -20
- package/dist/StudioUI-7VQHCHFQ.mjs.map +1 -0
- package/dist/{StudioUI-HWUO2H6J.js → StudioUI-VRSG32E3.js} +26 -20
- package/dist/StudioUI-VRSG32E3.js.map +1 -0
- package/dist/{chunk-ZGXOYJKZ.mjs → chunk-DTVEVFQ2.mjs} +1 -1
- package/dist/chunk-DTVEVFQ2.mjs.map +1 -0
- package/dist/{chunk-JWAAU3NN.js → chunk-L36EH3PM.js} +1 -1
- package/dist/chunk-L36EH3PM.js.map +1 -0
- package/dist/handlers/index.d.mts +1 -1
- package/dist/handlers/index.d.ts +1 -1
- package/dist/handlers/index.js +76 -44
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/index.mjs +57 -25
- package/dist/handlers/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{types-DzM_J-55.d.mts → types-C4hCz2w8.d.mts} +3 -1
- package/dist/{types-DzM_J-55.d.ts → types-C4hCz2w8.d.ts} +3 -1
- package/package.json +1 -1
- package/dist/StudioUI-HWUO2H6J.js.map +0 -1
- package/dist/StudioUI-LWHNOTSN.mjs.map +0 -1
- package/dist/chunk-JWAAU3NN.js.map +0 -1
- package/dist/chunk-ZGXOYJKZ.mjs.map +0 -1
|
@@ -357,9 +357,14 @@ function ProgressModal({
|
|
|
357
357
|
/* @__PURE__ */ jsxs("p", { css: styles.message, children: [
|
|
358
358
|
"Processed ",
|
|
359
359
|
progress.processed,
|
|
360
|
-
" image",
|
|
360
|
+
" new image",
|
|
361
361
|
progress.processed !== 1 ? "s" : "",
|
|
362
362
|
".",
|
|
363
|
+
progress.alreadyProcessed !== void 0 && progress.alreadyProcessed > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
364
|
+
" ",
|
|
365
|
+
progress.alreadyProcessed,
|
|
366
|
+
" already processed."
|
|
367
|
+
] }) : null,
|
|
363
368
|
progress.orphansRemoved !== void 0 && progress.orphansRemoved > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
364
369
|
" Removed ",
|
|
365
370
|
progress.orphansRemoved,
|
|
@@ -1315,7 +1320,7 @@ function StudioToolbar() {
|
|
|
1315
1320
|
const [showRenameFolderModal, setShowRenameFolderModal] = useState3(false);
|
|
1316
1321
|
const [showMoveModal, setShowMoveModal] = useState3(false);
|
|
1317
1322
|
const [showR2SetupModal, setShowR2SetupModal] = useState3(false);
|
|
1318
|
-
const [
|
|
1323
|
+
const [pushing, setPushing] = useState3(false);
|
|
1319
1324
|
const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
|
|
1320
1325
|
const handleUpload = useCallback(() => {
|
|
1321
1326
|
fileInputRef.current?.click();
|
|
@@ -1620,6 +1625,7 @@ function StudioToolbar() {
|
|
|
1620
1625
|
percent: 100,
|
|
1621
1626
|
status: "complete",
|
|
1622
1627
|
processed: data.processed,
|
|
1628
|
+
alreadyProcessed: data.alreadyProcessed,
|
|
1623
1629
|
orphansRemoved: data.orphansRemoved,
|
|
1624
1630
|
errors: data.errors
|
|
1625
1631
|
});
|
|
@@ -1808,10 +1814,10 @@ function StudioToolbar() {
|
|
|
1808
1814
|
total: imageKeys.length,
|
|
1809
1815
|
percent: 0,
|
|
1810
1816
|
status: "processing",
|
|
1811
|
-
message: "
|
|
1817
|
+
message: "Pushing to CDN..."
|
|
1812
1818
|
});
|
|
1813
1819
|
setShowProgress(true);
|
|
1814
|
-
let
|
|
1820
|
+
let pushed = 0;
|
|
1815
1821
|
let errors = 0;
|
|
1816
1822
|
const errorMessages = [];
|
|
1817
1823
|
try {
|
|
@@ -1839,8 +1845,8 @@ function StudioToolbar() {
|
|
|
1839
1845
|
}
|
|
1840
1846
|
errors++;
|
|
1841
1847
|
errorMessages.push(data.error || `Failed: ${imageKey}`);
|
|
1842
|
-
} else if (data.
|
|
1843
|
-
|
|
1848
|
+
} else if (data.pushed?.length > 0) {
|
|
1849
|
+
pushed++;
|
|
1844
1850
|
} else if (data.errors?.length > 0) {
|
|
1845
1851
|
errors++;
|
|
1846
1852
|
for (const errMsg of data.errors) {
|
|
@@ -1857,20 +1863,20 @@ function StudioToolbar() {
|
|
|
1857
1863
|
total: imageKeys.length,
|
|
1858
1864
|
percent: 100,
|
|
1859
1865
|
status: "complete",
|
|
1860
|
-
processed:
|
|
1866
|
+
processed: pushed,
|
|
1861
1867
|
errors,
|
|
1862
1868
|
errorMessages: errorMessages.length > 0 ? errorMessages : void 0
|
|
1863
1869
|
});
|
|
1864
1870
|
clearSelection();
|
|
1865
1871
|
triggerRefresh();
|
|
1866
1872
|
} catch (error) {
|
|
1867
|
-
console.error("
|
|
1873
|
+
console.error("Push error:", error);
|
|
1868
1874
|
setProgressState({
|
|
1869
1875
|
current: 0,
|
|
1870
1876
|
total: 0,
|
|
1871
1877
|
percent: 0,
|
|
1872
1878
|
status: "error",
|
|
1873
|
-
message: "Failed to
|
|
1879
|
+
message: "Failed to push to CDN."
|
|
1874
1880
|
});
|
|
1875
1881
|
}
|
|
1876
1882
|
}, [selectedItems, clearSelection, triggerRefresh]);
|
|
@@ -2326,7 +2332,7 @@ var StudioApiClient = class {
|
|
|
2326
2332
|
return this.post("/api/studio/move", { paths, destination });
|
|
2327
2333
|
}
|
|
2328
2334
|
// Image handlers
|
|
2329
|
-
async
|
|
2335
|
+
async push(imageKeys) {
|
|
2330
2336
|
return this.post("/api/studio/sync", { imageKeys });
|
|
2331
2337
|
}
|
|
2332
2338
|
async reprocess(imageKeys) {
|
|
@@ -2917,7 +2923,7 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
|
2917
2923
|
)
|
|
2918
2924
|
}
|
|
2919
2925
|
),
|
|
2920
|
-
item.
|
|
2926
|
+
item.cdnPushed && /* @__PURE__ */ jsx5("span", { css: styles5.cdnBadge, children: "CDN" }),
|
|
2921
2927
|
/* @__PURE__ */ jsxs5("div", { css: styles5.content, children: [
|
|
2922
2928
|
/* @__PURE__ */ jsxs5(
|
|
2923
2929
|
"button",
|
|
@@ -3503,7 +3509,7 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
|
3503
3509
|
] }) }),
|
|
3504
3510
|
/* @__PURE__ */ jsx6("td", { css: [styles6.td, styles6.meta], children: isFolder ? item.fileCount !== void 0 ? `${item.fileCount} files` : "--" : item.size !== void 0 ? formatFileSize2(item.size) : "--" }),
|
|
3505
3511
|
/* @__PURE__ */ jsx6("td", { css: [styles6.td, styles6.meta], children: isFolder ? item.totalSize !== void 0 ? formatFileSize2(item.totalSize) : "--" : item.dimensions ? `${item.dimensions.width}x${item.dimensions.height}` : "--" }),
|
|
3506
|
-
/* @__PURE__ */ jsx6("td", { css: styles6.td, children: item.
|
|
3512
|
+
/* @__PURE__ */ jsx6("td", { css: styles6.td, children: item.cdnPushed ? /* @__PURE__ */ jsxs6("span", { css: styles6.cdnBadge, children: [
|
|
3507
3513
|
/* @__PURE__ */ jsx6("svg", { css: styles6.cdnIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx6("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }),
|
|
3508
3514
|
"Synced"
|
|
3509
3515
|
] }) : /* @__PURE__ */ jsx6("span", { css: styles6.cdnEmpty, children: "--" }) })
|
|
@@ -3799,7 +3805,7 @@ function StudioDetailView() {
|
|
|
3799
3805
|
const [processProgress, setProcessProgress] = useState7(null);
|
|
3800
3806
|
const [alertMessage, setAlertMessage] = useState7(null);
|
|
3801
3807
|
const [showCopied, setShowCopied] = useState7(false);
|
|
3802
|
-
const [
|
|
3808
|
+
const [pushing, setPushing] = useState7(false);
|
|
3803
3809
|
if (!focusedItem) return null;
|
|
3804
3810
|
const isImage = isImageFile(focusedItem.name);
|
|
3805
3811
|
const isVideo = isVideoFile(focusedItem.name);
|
|
@@ -3873,7 +3879,7 @@ function StudioDetailView() {
|
|
|
3873
3879
|
};
|
|
3874
3880
|
const handleSync = async () => {
|
|
3875
3881
|
const imageKey = "/" + focusedItem.path.replace(/^public\//, "");
|
|
3876
|
-
|
|
3882
|
+
setPushing(true);
|
|
3877
3883
|
try {
|
|
3878
3884
|
const response = await fetch("/api/studio/sync", {
|
|
3879
3885
|
method: "POST",
|
|
@@ -3883,8 +3889,8 @@ function StudioDetailView() {
|
|
|
3883
3889
|
const data = await response.json();
|
|
3884
3890
|
if (response.ok) {
|
|
3885
3891
|
setAlertMessage({
|
|
3886
|
-
title: "
|
|
3887
|
-
message: "Successfully
|
|
3892
|
+
title: "Push Complete",
|
|
3893
|
+
message: "Successfully pushed to CDN."
|
|
3888
3894
|
});
|
|
3889
3895
|
triggerRefresh();
|
|
3890
3896
|
} else {
|
|
@@ -3904,7 +3910,7 @@ function StudioDetailView() {
|
|
|
3904
3910
|
message: "Failed to sync to CDN. Check console for details."
|
|
3905
3911
|
});
|
|
3906
3912
|
} finally {
|
|
3907
|
-
|
|
3913
|
+
setPushing(false);
|
|
3908
3914
|
}
|
|
3909
3915
|
};
|
|
3910
3916
|
const handleProcessImage = async () => {
|
|
@@ -4067,7 +4073,7 @@ function StudioDetailView() {
|
|
|
4067
4073
|
] }),
|
|
4068
4074
|
/* @__PURE__ */ jsxs7("div", { css: styles7.infoRow, children: [
|
|
4069
4075
|
/* @__PURE__ */ jsx7("span", { css: styles7.infoLabel, children: "CDN Status" }),
|
|
4070
|
-
/* @__PURE__ */ jsx7("span", { css: styles7.infoValue, children: focusedItem.
|
|
4076
|
+
/* @__PURE__ */ jsx7("span", { css: styles7.infoValue, children: focusedItem.cdnPushed ? "Pushed" : "Not pushed" })
|
|
4071
4077
|
] })
|
|
4072
4078
|
] }),
|
|
4073
4079
|
/* @__PURE__ */ jsxs7("div", { css: styles7.actions, children: [
|
|
@@ -4075,7 +4081,7 @@ function StudioDetailView() {
|
|
|
4075
4081
|
/* @__PURE__ */ jsx7("svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) }),
|
|
4076
4082
|
"Rename"
|
|
4077
4083
|
] }),
|
|
4078
|
-
/* @__PURE__ */ jsxs7("button", { css: styles7.actionBtn, onClick: handleSync, disabled:
|
|
4084
|
+
/* @__PURE__ */ jsxs7("button", { css: styles7.actionBtn, onClick: handleSync, disabled: pushing, children: [
|
|
4079
4085
|
/* @__PURE__ */ jsx7("svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) }),
|
|
4080
4086
|
syncing ? "Pushing..." : "Push to CDN"
|
|
4081
4087
|
] }),
|
|
@@ -4886,4 +4892,4 @@ export {
|
|
|
4886
4892
|
StudioUI,
|
|
4887
4893
|
StudioUI_default as default
|
|
4888
4894
|
};
|
|
4889
|
-
//# sourceMappingURL=StudioUI-
|
|
4895
|
+
//# sourceMappingURL=StudioUI-7VQHCHFQ.mjs.map
|