Skip to content

Commit

Permalink
Improve response view for empty fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
liffiton committed Jul 20, 2024
1 parent 4ca0130 commit 16b0510
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions src/codehelp/templates/help_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,32 @@
{% endif %}

<div class="field is-horizontal">
<div class="field-label is-normal">
<div class="field-label {% if query.code %}is-normal{% endif %}">
<label class="label">Code:</label>
</div>
<div class="field-body" style="overflow: auto; max-height: 30em;">
<pre>
{{- query.code -}}
</pre>
{% if query.code %}
<pre>
{{- query.code -}}
</pre>
{% else %}
<i class="has-text-grey-light">none</i>
{% endif %}
</div>
</div>

<div class="field is-horizontal">
<div class="field-label is-normal">
<div class="field-label {% if query.error %}is-normal{% endif %}">
<label class="label">Error Message:</label>
</div>
<div class="field-body" style="overflow-x: auto;">
<pre>
{{- query.error -}}
</pre>
{% if query.error %}
<pre>
{{- query.error -}}
</pre>
{% else %}
<i class="has-text-grey-light">none</i>
{% endif %}
</div>
</div>

Expand All @@ -72,7 +80,11 @@
<label class="label">Issue / Question:</label>
</div>
<div class="field-body" style="white-space: pre-wrap;">
{{- query.issue | trim -}}
{%- if query.issue -%}
{{- query.issue | trim -}}
{%- else -%}
<i class="has-text-grey-light">none</i>
{%- endif -%}
</div>
</div>

Expand Down

0 comments on commit 16b0510

Please sign in to comment.