mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Change nunjucks preview box to <textarea> (Closes #904)
This commit is contained in:
parent
bd683a7d1c
commit
4bd9b166cf
2
package-lock.json
generated
2
package-lock.json
generated
@ -1703,7 +1703,7 @@
|
|||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"cryptiles": {
|
"cryptile": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
@ -564,22 +564,15 @@ class TagEditor extends React.PureComponent<Props, State> {
|
|||||||
let previewElement;
|
let previewElement;
|
||||||
if (error) {
|
if (error) {
|
||||||
previewElement = (
|
previewElement = (
|
||||||
<pre>
|
<textarea className="danger" value={error || 'Error'} readOnly/>
|
||||||
<code className="block danger selectable">{error || <span> </span>}</code>
|
|
||||||
</pre>
|
|
||||||
);
|
);
|
||||||
} else if (rendering) {
|
} else if (rendering) {
|
||||||
previewElement = (
|
previewElement = (
|
||||||
<pre>
|
<textarea value="rendering..." readOnly/>
|
||||||
<code className="block"><span className="faint italic">rendering...</span></code>
|
|
||||||
</pre>
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
previewElement = (
|
previewElement = (
|
||||||
<pre>
|
<textarea value={preview || 'error'} readOnly rows={5}/>
|
||||||
<code className="block selectable scrollable force-wrap">{preview ||
|
|
||||||
<span> </span>}</code>
|
|
||||||
</pre>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,8 +93,8 @@ class VariableEditor extends PureComponent {
|
|||||||
<div className="form-control form-control--outlined">
|
<div className="form-control form-control--outlined">
|
||||||
<label>Live Preview
|
<label>Live Preview
|
||||||
{error
|
{error
|
||||||
? <code className="block danger selectable">{error || <span> </span>}</code>
|
? <textarea className="danger" value={error || 'Error'} readOnly/>
|
||||||
: <code className="block selectable">{preview || <span> </span>}</code>
|
: <textarea value={preview || ''} readOnly/>
|
||||||
}
|
}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user