Fix #775 handle inline dialogs in dialog_list preview

This commit is contained in:
Misode
2025-07-14 04:00:28 +02:00
parent edf72dd65f
commit 1bc0eb92a2

View File

@@ -107,8 +107,13 @@ function DialogActions({ dialog }: { dialog: any }) {
}
return <ColumnsGrid columns={dialog.columns ?? 2}>
{dialogs.map((d: any) => {
let text = Identifier.parse(d).path.replaceAll('/', ' ').replaceAll('_', ' ')
text = text.charAt(0).toUpperCase() + text.substring(1)
let text = ''
if (typeof d === 'string') {
text = Identifier.parse(d).path.replaceAll('/', ' ').replaceAll('_', ' ')
text = text.charAt(0).toUpperCase() + text.substring(1)
} else {
text = d?.external_title ?? d?.title ?? ''
}
return <Button label={text} width={dialog.button_width ?? 150} />
})}
</ColumnsGrid>