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
baf1dd9a
Commit
baf1dd9a
authored
Aug 03, 2021
by
lianahus
Committed by
Liana Husikyan
Aug 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed the info icons and fixed some layout issues
parent
811ce192
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
20 deletions
+39
-20
copy-to-clipboard.tsx
...clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx
+1
-0
compiler-container.tsx
...remix-ui/solidity-compiler/src/lib/compiler-container.tsx
+11
-3
remix-ui-static-analyser.tsx
...x-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
+27
-17
No files found.
libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx
View file @
baf1dd9a
...
@@ -40,6 +40,7 @@ export const CopyToClipboard = (props: ICopyToClipboard) => {
...
@@ -40,6 +40,7 @@ export const CopyToClipboard = (props: ICopyToClipboard) => {
}
}
return
(
return
(
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<
a
href=
'#'
onClick=
{
handleClick
}
onMouseLeave=
{
reset
}
>
<
a
href=
'#'
onClick=
{
handleClick
}
onMouseLeave=
{
reset
}
>
<
OverlayTrigger
placement=
{
direction
}
overlay=
{
<
OverlayTrigger
placement=
{
direction
}
overlay=
{
<
Tooltip
id=
"overlay-tooltip"
>
<
Tooltip
id=
"overlay-tooltip"
>
...
...
libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
View file @
baf1dd9a
...
@@ -5,6 +5,7 @@ import * as helper from '../../../../../apps/remix-ide/src/lib/helper'
...
@@ -5,6 +5,7 @@ import * as helper from '../../../../../apps/remix-ide/src/lib/helper'
import
{
canUseWorker
,
baseURLBin
,
baseURLWasm
,
urlFromVersion
,
pathToURL
,
promisedMiniXhr
}
from
'@remix-project/remix-solidity'
import
{
canUseWorker
,
baseURLBin
,
baseURLWasm
,
urlFromVersion
,
pathToURL
,
promisedMiniXhr
}
from
'@remix-project/remix-solidity'
import
{
compilerReducer
,
compilerInitialState
}
from
'./reducers/compiler'
import
{
compilerReducer
,
compilerInitialState
}
from
'./reducers/compiler'
import
{
resetEditorMode
,
listenToEvents
}
from
'./actions/compiler'
import
{
resetEditorMode
,
listenToEvents
}
from
'./actions/compiler'
import
{
OverlayTrigger
,
Tooltip
}
from
'react-bootstrap'
import
'./css/style.css'
import
'./css/style.css'
...
@@ -572,11 +573,18 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
...
@@ -572,11 +573,18 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
</
div
>
</
div
>
</
div
>
</
div
>
{
{
isHardHatProject
&&
<
div
className=
"mt-2 remixui_compilerConfig custom-control custom-checkbox"
>
isHardHatProject
&&
<
div
className=
"mt-3 remixui_compilerConfig custom-control custom-checkbox"
>
<
input
className=
"remixui_autocompile custom-control-input"
onChange=
{
updatehhCompilation
}
id=
"enableHardhat"
type=
"checkbox"
title=
"Enable Hardhat Compilation"
checked=
{
hhCompilation
}
/>
<
input
className=
"remixui_autocompile custom-control-input"
onChange=
{
updatehhCompilation
}
id=
"enableHardhat"
type=
"checkbox"
title=
"Enable Hardhat Compilation"
checked=
{
hhCompilation
}
/>
<
label
className=
"form-check-label custom-control-label"
htmlFor=
"enableHardhat"
>
Enable Hardhat Compilation
</
label
>
<
label
className=
"form-check-label custom-control-label"
htmlFor=
"enableHardhat"
>
Enable Hardhat Compilation
</
label
>
<
a
href=
"https://remix-ide.readthedocs.io/en/latest/hardhat.html#enable-hardhat-compilation"
target=
"_blank"
>
<
a
className=
"mt-1 text-nowrap"
href=
'https://remix-ide.readthedocs.io/en/latest/hardhat.html#enable-hardhat-compilation'
target=
{
'_blank'
}
>
<
i
className=
"ml-2 fas fa-info"
title=
"Know how to use Hardhat Compilation"
></
i
>
<
OverlayTrigger
placement=
{
'right'
}
overlay=
{
<
Tooltip
className=
"text-nowrap"
id=
"overlay-tooltip"
>
<
span
className=
"p-1 pr-3"
style=
{
{
backgroundColor
:
'black'
,
minWidth
:
'230px'
}
}
>
Learn how to use Hardhat Compilation
</
span
>
</
Tooltip
>
}
>
<
i
style=
{
{
fontSize
:
'medium'
}
}
className=
{
'ml-2 fal fa-info-circle'
}
aria
-
hidden=
"true"
></
i
>
</
OverlayTrigger
>
</
a
>
</
a
>
</
div
>
</
div
>
}
}
...
...
libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
View file @
baf1dd9a
...
@@ -7,6 +7,7 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line
...
@@ -7,6 +7,7 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line
import
ErrorRenderer
from
'./ErrorRenderer'
// eslint-disable-line
import
ErrorRenderer
from
'./ErrorRenderer'
// eslint-disable-line
import
{
compilation
}
from
'./actions/staticAnalysisActions'
import
{
compilation
}
from
'./actions/staticAnalysisActions'
import
{
initialState
,
analysisReducer
}
from
'./reducers/staticAnalysisReducer'
import
{
initialState
,
analysisReducer
}
from
'./reducers/staticAnalysisReducer'
import
{
OverlayTrigger
,
Tooltip
}
from
'react-bootstrap'
const
StaticAnalysisRunner
=
require
(
'@remix-project/remix-analyzer'
).
CodeAnalysis
const
StaticAnalysisRunner
=
require
(
'@remix-project/remix-analyzer'
).
CodeAnalysis
const
utils
=
remixLib
.
util
const
utils
=
remixLib
.
util
...
@@ -56,7 +57,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -56,7 +57,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
}
}
const
[
autoRun
,
setAutoRun
]
=
useState
(
true
)
const
[
autoRun
,
setAutoRun
]
=
useState
(
true
)
const
[
slitherEnabled
,
setSlitherEnabled
]
=
useState
(
false
)
const
[
slitherEnabled
,
setSlitherEnabled
]
=
useState
(
false
)
const
[
showSlither
,
setShowSlither
]
=
useState
(
'hidden'
)
const
[
showSlither
,
setShowSlither
]
=
useState
(
false
)
const
[
categoryIndex
,
setCategoryIndex
]
=
useState
(
groupedModuleIndex
(
groupedModules
))
const
[
categoryIndex
,
setCategoryIndex
]
=
useState
(
groupedModuleIndex
(
groupedModules
))
const
warningContainer
=
React
.
useRef
(
null
)
const
warningContainer
=
React
.
useRef
(
null
)
...
@@ -88,9 +89,9 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -88,9 +89,9 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
// Reset state
// Reset state
dispatch
({
type
:
''
,
payload
:
{}
})
dispatch
({
type
:
''
,
payload
:
{}
})
// Show 'Enable Slither Analysis' checkbox
// Show 'Enable Slither Analysis' checkbox
if
(
currentWorkspace
&&
currentWorkspace
.
isLocalhost
===
true
)
setShowSlither
(
'visible'
)
if
(
currentWorkspace
&&
currentWorkspace
.
isLocalhost
===
true
)
setShowSlither
(
true
)
else
{
else
{
setShowSlither
(
'hidden'
)
setShowSlither
(
false
)
setSlitherEnabled
(
false
)
setSlitherEnabled
(
false
)
}
}
})
})
...
@@ -103,7 +104,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -103,7 +104,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
props
.
event
.
trigger
(
'staticAnaysisWarning'
,
[])
props
.
event
.
trigger
(
'staticAnaysisWarning'
,
[])
// Reset state
// Reset state
dispatch
({
type
:
''
,
payload
:
{}
})
dispatch
({
type
:
''
,
payload
:
{}
})
setShowSlither
(
'hidden'
)
setShowSlither
(
false
)
setSlitherEnabled
(
false
)
setSlitherEnabled
(
false
)
}
}
})
})
...
@@ -414,19 +415,28 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -414,19 +415,28 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
/>
/>
<
Button
buttonText=
"Run"
onClick=
{
()
=>
run
(
state
.
data
,
state
.
source
,
state
.
file
)
}
disabled=
{
(
state
.
data
===
null
||
categoryIndex
.
length
===
0
)
&&
!
slitherEnabled
}
/>
<
Button
buttonText=
"Run"
onClick=
{
()
=>
run
(
state
.
data
,
state
.
source
,
state
.
file
)
}
disabled=
{
(
state
.
data
===
null
||
categoryIndex
.
length
===
0
)
&&
!
slitherEnabled
}
/>
</
div
>
</
div
>
<
div
className=
"d-flex"
id=
"enableSlitherAnalysis"
style=
{
{
visibility
:
showSlither
}
as
CSSProperties
}
>
{
showSlither
&&
<
RemixUiCheckbox
<
div
className=
"d-flex mt-2"
id=
"enableSlitherAnalysis"
>
id=
"enableSlither"
<
RemixUiCheckbox
inputType=
"checkbox"
id=
"enableSlither"
onClick=
{
handleSlitherEnabled
}
inputType=
"checkbox"
checked=
{
slitherEnabled
}
onClick=
{
handleSlitherEnabled
}
label=
"Enable Slither Analysis"
checked=
{
slitherEnabled
}
onChange=
{
()
=>
{}
}
label=
"Enable Slither Analysis"
/>
onChange=
{
()
=>
{}
}
<
a
href=
"https://remix-ide.readthedocs.io/en/latest/slither.html#enable-slither-analysis"
target=
"_blank"
>
/>
<
i
className=
"ml-3 fas fa-info"
title=
"Know how to use Slither Analysis"
></
i
>
</
a
>
<
a
className=
"mt-1 text-nowrap"
href=
'https://remix-ide.readthedocs.io/en/latest/slither.html#enable-slither-analysis'
target=
{
'_blank'
}
>
</
div
>
<
OverlayTrigger
placement=
{
'right'
}
overlay=
{
<
Tooltip
className=
"text-nowrap"
id=
"overlay-tooltip"
>
<
span
className=
"p-1 pr-3"
style=
{
{
backgroundColor
:
'black'
,
minWidth
:
'230px'
}
}
>
Learn how to use Slither Analysis
</
span
>
</
Tooltip
>
}
>
<
i
style=
{
{
fontSize
:
'medium'
}
}
className=
{
'fal fa-info-circle ml-3'
}
aria
-
hidden=
"true"
></
i
>
</
OverlayTrigger
>
</
a
>
</
div
>
}
</
div
>
</
div
>
<
div
id=
"staticanalysismodules"
className=
"list-group list-group-flush"
>
<
div
id=
"staticanalysismodules"
className=
"list-group list-group-flush"
>
{
Object
.
keys
(
groupedModules
).
map
((
categoryId
,
i
)
=>
{
{
Object
.
keys
(
groupedModules
).
map
((
categoryId
,
i
)
=>
{
...
...
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