diff --git a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx index d7b2a8fc71..9a0b0d063f 100644 --- a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx +++ b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx @@ -20,6 +20,7 @@ export interface RemixUiCheckboxProps { visibility?: string display?: string tooltipPlacement?: Placement + optionalClassName?: string } export const RemixUiCheckbox = ({ @@ -34,9 +35,10 @@ export const RemixUiCheckbox = ({ categoryId, title, visibility, + optionalClassName = '', display = 'flex', disabled = false, - tooltipPlacement = 'right' + tooltipPlacement = 'right', }: RemixUiCheckboxProps) => { const childJSXWithTooltip = ( @@ -45,7 +47,7 @@ export const RemixUiCheckbox = ({ tooltipId={`${name}Tooltip`} placement={tooltipPlacement} > -
+
{ const runAnalysis = async () => { await run(state.data, state.source, state.file, state, props, isSupportedVersion, showSlither, categoryIndex, groupedModules, runner,_paq, message, showWarnings, allWarnings, warningContainer,calculateWarningStateEntries, warningState, setHints, hints, setSlitherWarnings, setSsaWarnings) } - if (basicEnabled) { - if (state.data !== null) { - runAnalysis().catch(console.error); - } - } else { - props.event.trigger('staticAnaysisWarning', []) - } + props.event.trigger('staticAnaysisWarning', []) + // if (basicEnabled) { + // if (state.data !== null) { + // runAnalysis().catch(console.error); + // } + // } else { + // props.event.trigger('staticAnaysisWarning', []) + // } return () => { } }, [state]) @@ -252,14 +253,11 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } const handleSlitherEnabled = async () => { - const checkRemixd = await !props.analysisModule.call('manager', 'isActive', 'remixd') - if (showSlither && checkRemixd) { + const checkRemixd = await props.analysisModule.call('manager', 'isActive', 'remixd') + if (showSlither) { setShowSlither(false) - await props.analysisModule.call('manager', 'deactivatePlugin', 'remixd') - await props.analysisModule.call('filePanel', 'setWorkspace', 'default_workspace') - } else { - await props.analysisModule.call('manager', 'activatePlugin', 'remixd') - await props.analysisModule.call('filePanel', 'setWorkspace', { name: 'localhost', isLocalhost: true }, true) + } + if(!showSlither) { setShowSlither(true) } } @@ -548,7 +546,21 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
{!hideWarnings - ? slitherWarnings.map((warning, index) => ( + ? showLibsWarning ? slitherWarnings.filter(warning => warning.isLibrary).map((warning, index) => ( +
+ +
+ )) : slitherWarnings.map((warning, index) => (
{ ), }, ]; - const t = Object.entries(warningState) + const checkBasicStatus = () => { return Object.values(groupedModules).map((value: any) => { return (value.map(x => { @@ -599,115 +611,121 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
-
- {}} - tooltipPlacement={'top-start'} - /> - + { return (value.map(x => { return x._index.toString() })) }).flat().every(el => categoryIndex.includes(el))} - label="Basic" + label="Remix" onClick={() => { handleCheckAllModules(groupedModules) }} onChange={() => {}} + tooltipPlacement={'bottom-start'} + optionalClassName="mr-3" + /> + + {}} tooltipPlacement={'top-start'} + optionalClassName="mr-3" /> + {}} + optionalClassName="mr-3" + title="To run Slither analysis, you must activate remixd and connect remix ide to your local file system." />
- - {solhintEnabled ? - {tabKeys[0].child} - : null} - - { - checkBasicStatus() ? 0 ? (
+
+ Last results for: + + {state.file} + +
+
+ {}} + tooltipPlacement="top-start" + /> + {}} + /> +
+ + { + checkBasicStatus() ? + {tabKeys[1].child} + : null + } + {solhintEnabled ? - {tabKeys[1].child} - : null - } - - { showSlither ? - {tabKeys[2].child} - : null } - - + {tabKeys[0].child} + : null} + { showSlither ? + {tabKeys[2].child} + : null } + +
) : null} +
)