detailpanel
This commit is contained in:
@@ -255,6 +255,21 @@ export const createPreviewSurface = ({
|
||||
</>
|
||||
)
|
||||
: null;
|
||||
let breadcrumbs = null;
|
||||
if (document && typeof resolveFolderPath === 'function') {
|
||||
const folderSegments = resolveFolderPath(document.folder_id);
|
||||
const normalizedSegments = Array.isArray(folderSegments)
|
||||
? folderSegments
|
||||
.filter((segment) => segment && segment.id && segment.name)
|
||||
.map((segment) => ({ id: segment.id, name: segment.name }))
|
||||
: [];
|
||||
const documentLabel = document.title || document.original_name || 'Document';
|
||||
breadcrumbs = [
|
||||
...normalizedSegments,
|
||||
{ id: document.id || 'current-document', name: documentLabel },
|
||||
];
|
||||
}
|
||||
|
||||
const header = {
|
||||
title,
|
||||
subtitle: null,
|
||||
@@ -268,6 +283,7 @@ export const createPreviewSurface = ({
|
||||
notifyApiError,
|
||||
onRegenerate,
|
||||
}),
|
||||
breadcrumbs,
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -290,6 +306,7 @@ export const createPreviewSurface = ({
|
||||
onUpdateIssued={onUpdateIssued}
|
||||
resolveFolderPath={resolveFolderPath}
|
||||
onFolderNavigate={onFolderNavigate}
|
||||
showFolderPath={false}
|
||||
/>
|
||||
),
|
||||
supportsDetail: false,
|
||||
|
||||
Reference in New Issue
Block a user