Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
f56d21d4
Commit
f56d21d4
authored
Aug 24, 2021
by
davidzagi93@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting file
parent
b96c22f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
18 deletions
+13
-18
terminalAction.ts
libs/remix-ui/terminal/src/lib/actions/terminalAction.ts
+2
-2
remixWelcom.ts
libs/remix-ui/terminal/src/lib/reducers/remixWelcom.ts
+0
-0
remix-ui-terminal.css
libs/remix-ui/terminal/src/lib/remix-ui-terminal.css
+2
-2
remix-ui-terminal.tsx
libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
+9
-14
No files found.
libs/remix-ui/terminal/src/lib/actions/terminalAction.ts
View file @
f56d21d4
...
...
@@ -153,7 +153,7 @@ export const initListeningOnNetwork = (props, dispatch) => {
// // // append(el)
// }, { activate: true }, dispatch)
}
else
{
registerCommandAction
(
'knownTransaction'
,
function
(
args
,
cmds
,
append
)
{
registerCommandAction
(
'knownTransaction'
,
function
(
args
)
{
var
data
=
args
[
0
]
console
.
log
({
data
})
// let el
...
...
@@ -168,7 +168,7 @@ export const initListeningOnNetwork = (props, dispatch) => {
},
{
activate
:
true
},
dispatch
)
}
})
props
.
txListener
.
event
.
register
(
'newCall'
,
(
tx
)
=>
{
props
.
txListener
.
event
.
register
(
'newCall'
,
()
=>
{
console
.
log
(
'new call action'
)
// log(this, tx, null)
})
...
...
libs/remix-ui/terminal/src/lib/reducers/remixWelcom.ts
View file @
f56d21d4
libs/remix-ui/terminal/src/lib/remix-ui-terminal.css
View file @
f56d21d4
...
...
@@ -378,10 +378,10 @@ element.style {
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.accordion
:hover
,
/*
.accordion:hover,
.active {
background-color: #ccc;
}
}
*/
/* Style the accordion content title */
.accordion__title
{
...
...
libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
View file @
f56d21d4
...
...
@@ -259,11 +259,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
if
(
autoCompletState
.
showSuggestions
&&
(
event
.
which
===
13
||
event
.
which
===
9
))
{
if
(
autoCompletState
.
userInput
.
length
===
1
)
{
setAutoCompleteState
(
prevState
=>
({
...
prevState
,
activeSuggestion
:
0
,
showSuggestions
:
false
,
userInput
:
Object
.
keys
(
autoCompletState
.
data
.
_options
[
0
]).
toString
()
}))
}
// else if (autoCompletState.activeSuggestion === 0) {
// setAutoCompleteState(prevState => ({ ...prevState, activeSuggestion: 0, showSuggestions: false, userInput: autoCompletState.userInput }))
// }
else
{
}
else
{
console
.
log
(
autoCompletState
.
activeSuggestion
,
'autoCompletState.userInput.length'
)
setAutoCompleteState
(
prevState
=>
({
...
prevState
,
activeSuggestion
:
0
,
showSuggestions
:
false
,
userInput
:
Object
.
keys
(
autoCompletState
.
data
.
_options
[
autoCompletState
.
activeSuggestion
]).
toString
()
}))
}
...
...
@@ -335,7 +331,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
const
onMouseMove
:
any
=
(
e
:
MouseEvent
)
=>
{
e
.
preventDefault
()
if
(
dragging
&&
leftHeight
&&
separatorYPosition
)
{
const
newEditorHeight
=
leftHeight
-
e
.
clientY
+
separatorYPosition
//
const newEditorHeight = leftHeight - e.clientY + separatorYPosition
const
newLeftHeight
=
leftHeight
+
separatorYPosition
-
e
.
clientY
setSeparatorYPosition
(
e
.
clientY
)
setLeftHeight
(
newLeftHeight
)
...
...
@@ -362,7 +358,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
React
.
useEffect
(()
=>
{
const
leftRef
=
document
.
getElementById
(
'terminal-view'
)
const
editorRef
=
document
.
getElementById
(
'mainPanelPluginsContainer-id'
)
//
const editorRef = document.getElementById('mainPanelPluginsContainer-id')
if
(
leftRef
)
{
if
(
!
leftHeight
)
{
setLeftHeight
(
leftRef
.
offsetHeight
)
...
...
@@ -539,7 +535,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
}
}
const
txDetails
=
(
event
,
tx
,
obj
)
=>
{
const
txDetails
=
(
event
,
tx
)
=>
{
if
(
showTableHash
.
includes
(
tx
.
hash
))
{
const
index
=
showTableHash
.
indexOf
(
tx
.
hash
)
console
.
log
({
index
})
...
...
@@ -725,13 +721,12 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
const
renderUnKnownTransactions
=
(
tx
,
receipt
,
index
)
=>
{
const
from
=
tx
.
from
const
to
=
tx
.
to
const
obj
=
{
from
,
to
}
//
const obj = { from, to }
const
txType
=
'unknown'
+
(
tx
.
isCall
?
'Call'
:
'Tx'
)
console
.
log
(
'render unknown transaction '
)
return
(
<
span
id=
{
`tx${tx.hash}`
}
key=
{
index
}
>
<
div
className=
"log"
onClick=
{
(
event
)
=>
txDetails
(
event
,
tx
,
obj
)
}
>
{
/* onClick={e => txDetails(e, tx, data, obj)} */
}
<
div
className=
"log"
onClick=
{
(
event
)
=>
txDetails
(
event
,
tx
)
}
>
{
checkTxStatus
(
receipt
||
tx
,
txType
)
}
{
context
({
from
,
to
,
tx
},
props
.
blockchain
)
}
{
console
.
log
(
'under context and checkTxStatus'
)
}
...
...
@@ -763,12 +758,12 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
const
renderKnownTransactions
=
(
tx
,
receipt
,
resolvedData
,
logs
,
index
)
=>
{
const
from
=
tx
.
from
const
to
=
resolvedData
.
contractName
+
'.'
+
resolvedData
.
fn
const
obj
=
{
from
,
to
}
//
const obj = { from, to }
const
txType
=
'knownTx'
console
.
log
(
'render unknown transaction '
)
return
(
<
span
id=
{
`tx${tx.hash}`
}
key=
{
index
}
>
<
div
className=
"log"
onClick=
{
(
event
)
=>
txDetails
(
event
,
tx
,
obj
)
}
>
<
div
className=
"log"
onClick=
{
(
event
)
=>
txDetails
(
event
,
tx
)
}
>
{
checkTxStatus
(
receipt
,
txType
)
}
{
context
({
from
,
to
,
tx
},
props
.
blockchain
)
}
<
div
className=
'buttons'
>
...
...
@@ -820,7 +815,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
const
handlePaste
=
()
=>
{
setPaste
(
true
)
setAutoCompleteState
(
prevState
=>
({
...
prevState
,
activeSuggestion
:
0
,
showSuggestions
:
false
}))
setAutoCompleteState
(
prevState
=>
({
...
prevState
,
activeSuggestion
:
0
,
showSuggestions
:
false
}))
}
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment