Display arrays and objects in the entity modal as prettified JSON.

This commit is contained in:
Fabio Manganiello 2023-03-22 13:50:35 +01:00
parent c750d83188
commit bfc87e0f7b
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 8 additions and 1 deletions

View File

@ -314,7 +314,7 @@ export default {
if (value == null)
return ''
if (Array.isArray(value) || typeof value === 'object')
return JSON.stringify(value)
return JSON.stringify(value, null, 2)
return '' + value
},
},
@ -402,6 +402,13 @@ export default {
}
}
.extra-info-container {
.value {
white-space: pre-wrap;
opacity: 0.8;
}
}
.value {
&.url {
text-align: right;