|
|
@ -41,13 +41,13 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { |
|
|
|
if (javascriptVM === null || javascriptVM === undefined) ethereumVM(props.config, true, dispatch) |
|
|
|
if (javascriptVM === null || javascriptVM === undefined) ethereumVM(props.config, true, dispatch) |
|
|
|
|
|
|
|
|
|
|
|
const useAutoComplete = props.config.get('settings/auto-completion') |
|
|
|
const useAutoComplete = props.config.get('settings/auto-completion') |
|
|
|
if (useAutoComplete === null || useAutoComplete === undefined) useAutoCompletion(props.config, true, dispatch) |
|
|
|
if (useAutoComplete === null || useAutoComplete === undefined) useAutoCompletion(props.config, false, dispatch) |
|
|
|
|
|
|
|
|
|
|
|
const displayErrors = props.config.get('settings/display-errors') |
|
|
|
const displayErrors = props.config.get('settings/display-errors') |
|
|
|
if (displayErrors === null || displayErrors === undefined) useDisplayErrors(props.config, true, dispatch) |
|
|
|
if (displayErrors === null || displayErrors === undefined) useDisplayErrors(props.config, false, dispatch) |
|
|
|
|
|
|
|
|
|
|
|
const useShowGas = props.config.get('settings/show-gas') |
|
|
|
const useShowGas = props.config.get('settings/show-gas') |
|
|
|
if (useShowGas === null || useShowGas === undefined) useShowGasInEditor(props.config, true, dispatch) |
|
|
|
if (useShowGas === null || useShowGas === undefined) useShowGasInEditor(props.config, false, dispatch) |
|
|
|
} |
|
|
|
} |
|
|
|
useEffect(() => initValue(), [resetState, props.config]) |
|
|
|
useEffect(() => initValue(), [resetState, props.config]) |
|
|
|
useEffect(() => initValue(), []) |
|
|
|
useEffect(() => initValue(), []) |
|
|
@ -148,9 +148,10 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { |
|
|
|
const isEditorWrapChecked = props.config.get('settings/text-wrap') || false |
|
|
|
const isEditorWrapChecked = props.config.get('settings/text-wrap') || false |
|
|
|
const isPersonalChecked = props.config.get('settings/personal-mode') || false |
|
|
|
const isPersonalChecked = props.config.get('settings/personal-mode') || false |
|
|
|
const isMatomoChecked = props.config.get('settings/matomo-analytics') || false |
|
|
|
const isMatomoChecked = props.config.get('settings/matomo-analytics') || false |
|
|
|
const isAutoCompleteChecked = props.config.get('settings/auto-completion') === null ? true:props.config.get('settings/auto-completion') |
|
|
|
|
|
|
|
const isShowGasInEditorChecked = props.config.get('settings/show-gas') === null ? true:props.config.get('settings/show-gas') |
|
|
|
const isAutoCompleteChecked = props.config.get('settings/auto-completion') || false |
|
|
|
const displayErrorsChecked = props.config.get('settings/display-errors') === null ? true:props.config.get('settings/display-errors') |
|
|
|
const isShowGasInEditorChecked = props.config.get('settings/show-gas') || false |
|
|
|
|
|
|
|
const displayErrorsChecked = props.config.get('settings/display-errors') || false |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="$border-top"> |
|
|
|
<div className="$border-top"> |
|
|
|
<div title="Reset to Default settings." className='d-flex justify-content-end pr-4'> |
|
|
|
<div title="Reset to Default settings." className='d-flex justify-content-end pr-4'> |
|
|
@ -188,19 +189,19 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='custom-control custom-checkbox mb-1'> |
|
|
|
<div className='custom-control custom-checkbox mb-1'> |
|
|
|
<input onChange={onchangeUseAutoComplete} id="settingsUseAutoComplete" type="checkbox" className="custom-control-input" checked={isAutoCompleteChecked} /> |
|
|
|
<input onChange={onchangeUseAutoComplete} id="settingsUseAutoComplete" type="checkbox" className="custom-control-input" checked={isAutoCompleteChecked} /> |
|
|
|
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/auto-completion')}`} htmlFor="settingsUseAutoComplete"> |
|
|
|
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/auto-completion')}`} data-id="settingsAutoCompleteLabel" htmlFor="settingsUseAutoComplete"> |
|
|
|
<span>{useAutoCompleteText}</span> |
|
|
|
<span>{useAutoCompleteText}</span> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='custom-control custom-checkbox mb-1'> |
|
|
|
<div className='custom-control custom-checkbox mb-1'> |
|
|
|
<input onChange={onchangeShowGasInEditor} id="settingsUseShowGas" type="checkbox" className="custom-control-input" checked={isShowGasInEditorChecked} /> |
|
|
|
<input onChange={onchangeShowGasInEditor} id="settingsUseShowGas" type="checkbox" className="custom-control-input" checked={isShowGasInEditorChecked} /> |
|
|
|
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/show-gas')}`} htmlFor="settingsUseShowGas"> |
|
|
|
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/show-gas')}`} data-id="settingsShowGasLabel" htmlFor="settingsUseShowGas"> |
|
|
|
<span>{useShowGasInEditorText}</span> |
|
|
|
<span>{useShowGasInEditorText}</span> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='custom-control custom-checkbox mb-1'> |
|
|
|
<div className='custom-control custom-checkbox mb-1'> |
|
|
|
<input onChange={onchangeDisplayErrors} id="settingsDisplayErrors" type="checkbox" className="custom-control-input" checked={displayErrorsChecked} /> |
|
|
|
<input onChange={onchangeDisplayErrors} id="settingsDisplayErrors" type="checkbox" className="custom-control-input" checked={displayErrorsChecked} /> |
|
|
|
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/display-errors')}`} htmlFor="settingsDisplayErrors"> |
|
|
|
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/display-errors')}`} data-id="displayErrorsLabel" htmlFor="settingsDisplayErrors"> |
|
|
|
<span>{displayErrorsText}</span> |
|
|
|
<span>{displayErrorsText}</span> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|