sanity-plugin-r2-video 0.1.6 → 0.1.7
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/studio/index.js +3 -2
- package/package.json +1 -1
package/dist/studio/index.js
CHANGED
|
@@ -1386,6 +1386,7 @@ var DialogDetails = ({
|
|
|
1386
1386
|
fetchFolders(client, config.folders.type).then(setFolders);
|
|
1387
1387
|
}, [client, config.folders.type]);
|
|
1388
1388
|
const paths = resolveFolderPaths(folders);
|
|
1389
|
+
const isBroken = asset.renditions.length === 0;
|
|
1389
1390
|
const trimmed = filename.trim();
|
|
1390
1391
|
const savedFolderId = asset.folder ? asset.folder._ref : "";
|
|
1391
1392
|
const isRenamed = trimmed.length > 0 && trimmed !== asset.filename;
|
|
@@ -1458,7 +1459,7 @@ var DialogDetails = ({
|
|
|
1458
1459
|
onClick: isDirty ? reset : onClose
|
|
1459
1460
|
}
|
|
1460
1461
|
) }),
|
|
1461
|
-
/* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(
|
|
1462
|
+
!isBroken && /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(
|
|
1462
1463
|
Button,
|
|
1463
1464
|
{
|
|
1464
1465
|
disabled: isSaving || !isDirty,
|
|
@@ -1469,7 +1470,7 @@ var DialogDetails = ({
|
|
|
1469
1470
|
}
|
|
1470
1471
|
) })
|
|
1471
1472
|
] }) }),
|
|
1472
|
-
children: /* @__PURE__ */ jsx(Card, { padding: 4, children: /* @__PURE__ */ jsxs(Stack, { gap: 5, children: [
|
|
1473
|
+
children: /* @__PURE__ */ jsx(Card, { padding: 4, children: isBroken ? /* @__PURE__ */ jsx(Card, { padding: 4, radius: 2, tone: "caution", children: /* @__PURE__ */ jsx(Text, { size: 1, children: "This video was never finished uploading, so it has no renditions and nothing stored behind it. Delete it." }) }) : /* @__PURE__ */ jsxs(Stack, { gap: 5, children: [
|
|
1473
1474
|
/* @__PURE__ */ jsx(
|
|
1474
1475
|
VideoPreview,
|
|
1475
1476
|
{
|