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 untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

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