fix: asset manager no longer closes edit modal on select
Deploy to VPS / deploy (push) Has been cancelled

This commit is contained in:
2026-04-08 12:14:40 -05:00
parent c5b78c539e
commit 20976432c9
3 changed files with 3 additions and 3 deletions
@@ -103,7 +103,7 @@ function AssetManager({ slug, scope = "cases", isOpen, onClose, onSelect, accent
if (e) { e.preventDefault(); e.stopPropagation(); } if (e) { e.preventDefault(); e.stopPropagation(); }
if (item.type === "folder") { fetchAssets(item.path); return; } if (item.type === "folder") { fetchAssets(item.path); return; }
onSelect({ name: item.name, publicUrl: item.publicUrl || "/" + scope + "/" + slug + "/" + item.path, mediaType: item.mediaType || "unknown", path: item.path }); onSelect({ name: item.name, publicUrl: item.publicUrl || "/" + scope + "/" + slug + "/" + item.path, mediaType: item.mediaType || "unknown", path: item.path });
onClose(); // Don't close automatically — let user select multiple files or close manually
}; };
const copyPath = (item: AssetItem) => { const copyPath = (item: AssetItem) => {
+1 -1
View File
@@ -99,7 +99,7 @@ function AssetManager({ slug, scope = "news", isOpen, onClose, onSelect, accentC
if (e) { e.preventDefault(); e.stopPropagation(); } if (e) { e.preventDefault(); e.stopPropagation(); }
if (item.type === "folder") { fetchAssets(item.path); return; } if (item.type === "folder") { fetchAssets(item.path); return; }
onSelect({ name: item.name, publicUrl: item.publicUrl || "/" + scope + "/" + slug + "/" + item.path, mediaType: item.mediaType || "unknown", path: item.path }); onSelect({ name: item.name, publicUrl: item.publicUrl || "/" + scope + "/" + slug + "/" + item.path, mediaType: item.mediaType || "unknown", path: item.path });
onClose(); //onClose();
}; };
const copyPath = (item: AssetItem) => { const copyPath = (item: AssetItem) => {
+1 -1
View File
@@ -72,7 +72,7 @@ function AssetManager({ slug, scope = "parts", isOpen, onClose, onSelect, accent
if (e) { e.preventDefault(); e.stopPropagation(); } if (e) { e.preventDefault(); e.stopPropagation(); }
if (item.type === "folder") { fetchAssets(item.path); return; } if (item.type === "folder") { fetchAssets(item.path); return; }
onSelect({ name: item.name, publicUrl: item.publicUrl || "/"+scope+"/"+slug+"/"+item.path, mediaType: item.mediaType || "unknown", path: item.path }); onSelect({ name: item.name, publicUrl: item.publicUrl || "/"+scope+"/"+slug+"/"+item.path, mediaType: item.mediaType || "unknown", path: item.path });
onClose(); //onClose();
}; };
const copyPath = (item: AssetItem) => { navigator.clipboard.writeText(item.publicUrl || "/"+scope+"/"+slug+"/"+item.path); setCopiedPath(item.path); setTimeout(() => setCopiedPath(null), 1500); }; const copyPath = (item: AssetItem) => { navigator.clipboard.writeText(item.publicUrl || "/"+scope+"/"+slug+"/"+item.path); setCopiedPath(item.path); setTimeout(() => setCopiedPath(null), 1500); };