minor changes on terminal

pull/1342/head
davidzagi93@gmail.com 3 years ago
parent bf93deeb71
commit 4c7211f275
  1. 1
      apps/remix-ide/src/app/panels/terminal.js
  2. 14
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -105,7 +105,6 @@ class Terminal extends Plugin {
}
logHtml (html) {
// console.log({ html: html.innerText })
this.logHtmlResponse.push(html.innerText)
this.renderComponent()
this.resetLogHtml()

@ -503,7 +503,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
{newstate.journalBlocks && newstate.journalBlocks.map((x, index) => {
if (x.name === 'emptyBlock') {
return (
<div className="px-4 block" data-id='block_null' key={index}>
<div className="px-4 block" data-id='block' key={index}>
<span className='txLog'>
<span className='tx'><div className='txItem'>[<span className='txItemTitle'>block:{x.message} - </span> 0 {'transactions'} ] </div></span></span>
</div>
@ -520,18 +520,20 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
return x.message.map((msg, i) => {
if (typeof msg === 'object') {
return (
<div className="px-4 block" data-id="block_null" key={i}><span className={x.style}>{ msg.value ? parse(msg.value) : JSON.stringify(msg) } </span></div>
<div className="px-4 block" data-id="block" key={i}><span className={x.style}>{ msg.value ? parse(msg.value) : JSON.stringify(msg) } </span></div>
)
} else {
return (
<div className="px-4 block" data-id="block_null" key={i}>{ msg ? msg.toString().replace(/,/g, '') : msg }</div>
<div className="px-4 block" data-id="block" key={i}>{ msg ? msg.toString().replace(/,/g, '') : msg }</div>
)
}
})
} else {
return (
<div className="px-4 block" data-id="block_null" key={index}> <span className={x.style}> {x.message}</span></div>
)
if (typeof x.message !== 'function') {
return (
<div className="px-4 block" data-id="block" key={index}> <span className={x.style}> {x.message}</span></div>
)
}
}
})}
<div ref={messagesEndRef} />

Loading…
Cancel
Save