From baf1dd9a459d034a0089cd25367883ce8ca55de9 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 3 Aug 2021 15:47:42 +0200 Subject: [PATCH] changed the info icons and fixed some layout issues --- .../copy-to-clipboard/copy-to-clipboard.tsx | 1 + .../src/lib/compiler-container.tsx | 14 ++++-- .../src/lib/remix-ui-static-analyser.tsx | 44 ++++++++++++------- 3 files changed, 39 insertions(+), 20 deletions(-) diff --git a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx index cea2b0d7a1..a892831d99 100644 --- a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx +++ b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx @@ -40,6 +40,7 @@ export const CopyToClipboard = (props: ICopyToClipboard) => { } return ( + // eslint-disable-next-line jsx-a11y/anchor-is-valid diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index b207d21e85..1c78126451 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -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 { compilerReducer, compilerInitialState } from './reducers/compiler' import { resetEditorMode, listenToEvents } from './actions/compiler' +import { OverlayTrigger, Tooltip } from 'react-bootstrap' import './css/style.css' @@ -572,11 +573,18 @@ export const CompilerContainer = (props: CompilerContainerProps) => { { - isHardHatProject &&
+ isHardHatProject && +
- - + + + Learn how to use Hardhat Compilation + + }> + +
} diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 01b4e2fc3e..4e6f6d410a 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -7,6 +7,7 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line import ErrorRenderer from './ErrorRenderer' // eslint-disable-line import { compilation } from './actions/staticAnalysisActions' import { initialState, analysisReducer } from './reducers/staticAnalysisReducer' +import { OverlayTrigger, Tooltip } from 'react-bootstrap' const StaticAnalysisRunner = require('@remix-project/remix-analyzer').CodeAnalysis const utils = remixLib.util @@ -56,7 +57,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } const [autoRun, setAutoRun] = useState(true) const [slitherEnabled, setSlitherEnabled] = useState(false) - const [showSlither, setShowSlither] = useState('hidden') + const [showSlither, setShowSlither] = useState(false) const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules)) const warningContainer = React.useRef(null) @@ -88,9 +89,9 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { // Reset state dispatch({ type: '', payload: {} }) // Show 'Enable Slither Analysis' checkbox - if (currentWorkspace && currentWorkspace.isLocalhost === true) setShowSlither('visible') + if (currentWorkspace && currentWorkspace.isLocalhost === true) setShowSlither(true) else { - setShowSlither('hidden') + setShowSlither(false) setSlitherEnabled(false) } }) @@ -103,7 +104,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { props.event.trigger('staticAnaysisWarning', []) // Reset state dispatch({ type: '', payload: {} }) - setShowSlither('hidden') + setShowSlither(false) setSlitherEnabled(false) } }) @@ -414,19 +415,28 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { />
-
- {}} - /> - - - -
+ { showSlither && +
+ {}} + /> + + + + Learn how to use Slither Analysis + + }> + + + +
+ }
{Object.keys(groupedModules).map((categoryId, i) => {