fix: asset manager no longer closes edit modal on select
Deploy to VPS / deploy (push) Has been cancelled
Deploy to VPS / deploy (push) Has been cancelled
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
@@ -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); };
|
||||||
|
|||||||
Reference in New Issue
Block a user