From 14771e900787cea663d3c7377145337b250f5142 Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Tue, 21 Sep 2021 15:20:13 +0100 Subject: [PATCH] refactor: little changes to terminal --- libs/remix-ui/terminal/src/lib/remix-ui-terminal.css | 4 ++++ libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css index eadcabb373..6af3918cbe 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css @@ -9,6 +9,10 @@ element.style { font-weight: bold; color: #a2a3b4; border-top-style: hidden; + + + + border-right-style: hidden; border-left-style: hidden; border-bottom-style: hidden; diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 97c2769d64..f847bcb191 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -14,7 +14,7 @@ import RenderUnKnownTransactions from './components/RenderUnknownTransactions' / import RenderCall from './components/RenderCall' // eslint-disable-line import RenderKnownTransactions from './components/RenderKnownTransactions' // eslint-disable-line import parse from 'html-react-parser' -import { RemixUiTerminalProps } from './types/terminalTypes' +import { EmptyBlock, KnownTransaction, RemixUiTerminalProps, UnknownTransaction } from './types/terminalTypes' import { wrapScript } from './utils/wrapScript' /* eslint-disable-next-line */ @@ -501,18 +501,18 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
{!clearConsole && } {newstate.journalBlocks && newstate.journalBlocks.map((x, index) => { - if (x.name === 'emptyBlock') { + if (x.name === EmptyBlock) { return (
[block:{x.message} - 0 {'transactions'} ]
) - } else if (x.name === 'unknownTransaction') { + } else if (x.name === UnknownTransaction) { return x.message.filter(x => x.tx.hash.includes(searchInput) || x.tx.from.includes(searchInput) || (x.tx.to.includes(searchInput))).map((trans) => { return (
{ }
) }) - } else if (x.name === 'knownTransaction') { + } else if (x.name === KnownTransaction) { return x.message.map((trans) => { return (
{ trans.tx.isCall ? : () }
) }) @@ -524,7 +524,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { ) } else { return ( -
{ msg ? msg.toString().replace(/,/g, '') : msg }
+
{ msg ? msg.toString().replace(/,/g, '') : msg }
) } })