Skip to content

Commit

Permalink
fix: json field formatting (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav committed Dec 24, 2023
1 parent ad5069e commit fbf7f08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/unfold/static/unfold/css/styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/unfold/templates/admin/includes/fieldset.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 class="bg-gray-100 border border-transparent font-semibold mb-6 px-4 py-3 ro
</div>

{% if field.is_readonly %}
<div class="readonly bg-gray-50 border font-medium max-w-2xl px-3 py-2 rounded-md shadow-sm text-gray-500 text-sm dark:border-gray-700 dark:text-gray-400 dark:bg-gray-800 {% if field.is_json %}whitespace-pre{% endif %}">{% if field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
<div class="readonly bg-gray-50 border font-medium max-w-2xl px-3 py-2 rounded-md shadow-sm text-gray-500 text-sm dark:border-gray-700 dark:text-gray-400 dark:bg-gray-800 {% if field.is_json %}truncate whitespace-pre-wrap{% endif %}">{% if field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
{% else %}
{{ field.field }}
{% endif %}
Expand Down

0 comments on commit fbf7f08

Please sign in to comment.