lint remix-ui

git4refactor
filip mertens 7 months ago
parent 32d9abf089
commit c3db5384c9
  1. 4
      libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts
  2. 4
      libs/remix-ui/editor/src/lib/providers/completionProvider.ts
  3. 2
      libs/remix-ui/editor/src/lib/providers/hoverProvider.ts
  4. 1
      libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts
  5. 2
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
  6. 1
      libs/remix-ui/git/src/components/buttons/sourceControlBase.tsx
  7. 4
      libs/remix-ui/git/src/components/buttons/sourcecontrolbuttons.tsx
  8. 5
      libs/remix-ui/git/src/components/github/devicecode.tsx
  9. 2
      libs/remix-ui/git/src/components/github/selectandclonerepositories.tsx
  10. 5
      libs/remix-ui/git/src/components/gitui.tsx
  11. 1
      libs/remix-ui/git/src/components/navigation/commits.tsx
  12. 2
      libs/remix-ui/git/src/components/navigation/settings.tsx
  13. 1
      libs/remix-ui/git/src/components/navigation/sourcecontrol.tsx
  14. 1
      libs/remix-ui/git/src/components/navigation/sourcecontrolgroup.tsx
  15. 3
      libs/remix-ui/git/src/components/panels/branches/localbranchdetails.tsx
  16. 1
      libs/remix-ui/git/src/components/panels/branches/remotebranchedetails.tsx
  17. 3
      libs/remix-ui/git/src/components/panels/clone.tsx
  18. 1
      libs/remix-ui/git/src/components/panels/commands/fetch.tsx
  19. 9
      libs/remix-ui/git/src/components/panels/commands/merge.tsx
  20. 9
      libs/remix-ui/git/src/components/panels/commands/pushpull.tsx
  21. 1
      libs/remix-ui/git/src/components/panels/commits.tsx
  22. 1
      libs/remix-ui/git/src/components/panels/commits/commitdetailsitem.tsx
  23. 2
      libs/remix-ui/git/src/components/panels/commits/commitsummary.tsx
  24. 3
      libs/remix-ui/git/src/components/panels/github.tsx
  25. 2
      libs/remix-ui/git/src/components/panels/githubcredentials.tsx
  26. 2
      libs/remix-ui/git/src/components/panels/remotes.tsx
  27. 5
      libs/remix-ui/git/src/components/panels/remotesimport.tsx
  28. 4
      libs/remix-ui/git/src/components/panels/settings.tsx
  29. 1
      libs/remix-ui/git/src/components/panels/sourcontrol.tsx
  30. 3
      libs/remix-ui/git/src/lib/fileHelpers.ts
  31. 14
      libs/remix-ui/git/src/lib/gitactions.ts
  32. 3
      libs/remix-ui/git/src/lib/listeners.ts
  33. 4
      libs/remix-ui/git/src/lib/pluginActions.ts
  34. 1
      libs/remix-ui/git/src/state/gitpayload.ts
  35. 16
      libs/remix-ui/git/src/state/gitreducer.tsx
  36. 1
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx
  37. 1
      libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
  38. 2
      libs/remix-ui/home-tab/src/lib/components/homeTablangOptions.tsx
  39. 1
      libs/remix-ui/run-tab/src/lib/actions/account.ts
  40. 1
      libs/remix-ui/run-tab/src/lib/actions/events.ts
  41. 3
      libs/remix-ui/search/src/lib/components/results/SearchHelper.ts
  42. 2
      libs/remix-ui/search/src/lib/types/index.ts
  43. 1
      libs/remix-ui/solidity-compile-details/src/lib/components/solidityCompile.tsx
  44. 1
      libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts
  45. 2
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  46. 1
      libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx
  47. 1
      libs/remix-ui/solidity-compiler/src/lib/types/index.ts
  48. 2
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx
  49. 1
      libs/remix-ui/static-analyser/src/staticanalyser.d.ts
  50. 1
      libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
  51. 1
      libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx
  52. 2
      libs/remix-ui/workspace/src/lib/components/electron-menu.tsx
  53. 1
      libs/remix-ui/workspace/src/lib/components/electron-workspace-name.tsx
  54. 4
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  55. 2
      libs/remix-ui/workspace/src/lib/components/flat-tree-drop.tsx
  56. 1
      libs/remix-ui/workspace/src/lib/contexts/index.ts
  57. 1
      libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx
  58. 1
      libs/remix-ui/workspace/src/lib/reducers/workspace.ts
  59. 2
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  60. 2
      libs/remix-ui/xterm/src/lib/components/remix-ui-xterminals.tsx
  61. 2
      libs/remix-ui/xterm/src/lib/components/xterm-fit-addOn.ts

@ -33,7 +33,6 @@ export function getBytesCompletionItems(range: monacoTypes.IRange, monaco): mona
] ]
} }
export function getBlockCompletionItems(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { export function getBlockCompletionItems(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] {
return [ return [
{ {
@ -442,7 +441,6 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco
]; ];
} }
export function GetCompletionTypes(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { export function GetCompletionTypes(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] {
const completionItems = []; const completionItems = [];
const types = ['address', 'string', 'bytes', 'byte', 'int', 'uint', 'bool', 'hash']; const types = ['address', 'string', 'bytes', 'byte', 'int', 'uint', 'bool', 'hash'];
@ -510,7 +508,6 @@ export function GetCompletionKeywords(range: monacoTypes.IRange, monaco): monaco
return completionItems; return completionItems;
} }
export function GeCompletionUnits(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { export function GeCompletionUnits(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] {
const completionItems = []; const completionItems = [];
const etherUnits = ['wei', 'gwei', 'finney', 'szabo', 'ether']; const etherUnits = ['wei', 'gwei', 'finney', 'szabo', 'ether'];
@ -557,7 +554,6 @@ export function GetImports(range: monacoTypes.IRange
} }
})] })]
list = [...list, list = [...list,
...data.files ...data.files
.filter((item) => item.startsWith(word)) .filter((item) => item.startsWith(word))

@ -158,7 +158,6 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion
return variableDeclaration return variableDeclaration
} }
for (const node of Object.values(filteredNodes) as any[]) { for (const node of Object.values(filteredNodes) as any[]) {
if (!node.name) continue if (!node.name) continue
if (node.nodeType === 'VariableDeclaration') { if (node.nodeType === 'VariableDeclaration') {
@ -348,7 +347,6 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion
}) })
} }
for (const nodeOfScope of contractCompletions) { for (const nodeOfScope of contractCompletions) {
if (nodeOfScope.name === nameOfLastTypedExpression) { if (nodeOfScope.name === nameOfLastTypedExpression) {
if (nodeOfScope.typeName && nodeOfScope.typeName.nodeType === 'UserDefinedTypeName') { if (nodeOfScope.typeName && nodeOfScope.typeName.nodeType === 'UserDefinedTypeName') {
@ -373,8 +371,6 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion
} }
return { nodes, suggestions } return { nodes, suggestions }
} }

@ -46,7 +46,6 @@ export class RemixHoverProvider implements monacoTypes.languages.HoverProvider {
return await this.props.plugin.call('codeParser', 'getVariableDeclaration', node) return await this.props.plugin.call('codeParser', 'getVariableDeclaration', node)
} }
const getParamaters = async (node: any) => { const getParamaters = async (node: any) => {
return await this.props.plugin.call('codeParser', 'getFunctionParamaters', node) return await this.props.plugin.call('codeParser', 'getFunctionParamaters', node)
} }
@ -55,7 +54,6 @@ export class RemixHoverProvider implements monacoTypes.languages.HoverProvider {
return await this.props.plugin.call('codeParser', 'getFunctionReturnParameters', node) return await this.props.plugin.call('codeParser', 'getFunctionReturnParameters', node)
} }
const getOverrides = async (node: any) => { const getOverrides = async (node: any) => {
if (node.overrides) { if (node.overrides) {
const overrides = [] const overrides = []

@ -20,7 +20,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
this.completionEnabled = true this.completionEnabled = true
} }
async provideInlineCompletions(model: monacoTypes.editor.ITextModel, position: monacoTypes.Position, context: monacoTypes.languages.InlineCompletionContext, token: monacoTypes.CancellationToken): Promise<monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>> { async provideInlineCompletions(model: monacoTypes.editor.ITextModel, position: monacoTypes.Position, context: monacoTypes.languages.InlineCompletionContext, token: monacoTypes.CancellationToken): Promise<monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>> {
if (context.selectedSuggestionInfo) { if (context.selectedSuggestionInfo) {
return; return;

@ -781,7 +781,6 @@ export const EditorUI = (props: EditorUIProps) => {
}, },
} }
const freeFunctionCondition = editor.createContextKey('freeFunctionCondition', false) const freeFunctionCondition = editor.createContextKey('freeFunctionCondition', false)
let freeFunctionAction let freeFunctionAction
const executeFreeFunctionAction = { const executeFreeFunctionAction = {
@ -847,7 +846,6 @@ export const EditorUI = (props: EditorUIProps) => {
return return
} }
const { nodesAtPosition } = await retrieveNodesAtPosition(props.editorAPI, props.plugin) const { nodesAtPosition } = await retrieveNodesAtPosition(props.editorAPI, props.plugin)
const freeFunctionNode = nodesAtPosition.find((node) => node.kind === 'freeFunction') const freeFunctionNode = nodesAtPosition.find((node) => node.kind === 'freeFunction')
if (freeFunctionNode) { if (freeFunctionNode) {

@ -38,7 +38,6 @@ export const SourceControlBase = (props: SourceControlButtonsProps) => {
} }
}, [context.branchDifferences, context.currentBranch, branch, remote]) }, [context.branchDifferences, context.currentBranch, branch, remote])
const setDefaultRemote = () => { const setDefaultRemote = () => {
if (context.remotes.length > 0) { if (context.remotes.length > 0) {

@ -34,7 +34,6 @@ export const SourceControlButtons = (props: SourceControlButtonsProps) => {
} }
}, [context.branchDifferences, context.currentBranch, branch, remote]) }, [context.branchDifferences, context.currentBranch, branch, remote])
const setDefaultRemote = () => { const setDefaultRemote = () => {
if (context.remotes.length > 0) { if (context.remotes.length > 0) {
@ -78,8 +77,6 @@ export const SourceControlButtons = (props: SourceControlButtonsProps) => {
console.log('SC BUTTONS', branch, remote) console.log('SC BUTTONS', branch, remote)
}, []) }, [])
const pull = async () => { const pull = async () => {
await actions.pull(remote.remote, branch.name) await actions.pull(remote.remote, branch.name)
} }
@ -97,7 +94,6 @@ export const SourceControlButtons = (props: SourceControlButtonsProps) => {
return (!context.upstream) || context.remotes.length === 0 return (!context.upstream) || context.remotes.length === 0
} }
return ( return (
<span className='d-flex justify-content-end align-items-center'> <span className='d-flex justify-content-end align-items-center'>
<CustomTooltip tooltipText={<FormattedMessage id="git.pull" />}> <CustomTooltip tooltipText={<FormattedMessage id="git.pull" />}>

@ -5,7 +5,6 @@ import axios from "axios";
import { CopyToClipboard } from "@remix-ui/clipboard"; import { CopyToClipboard } from "@remix-ui/clipboard";
import { Card } from "react-bootstrap"; import { Card } from "react-bootstrap";
export const GetDeviceCode = () => { export const GetDeviceCode = () => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
@ -13,8 +12,6 @@ export const GetDeviceCode = () => {
const [gitHubResponse, setGitHubResponse] = React.useState<any>(null) const [gitHubResponse, setGitHubResponse] = React.useState<any>(null)
const [authorized, setAuthorized] = React.useState<boolean>(false) const [authorized, setAuthorized] = React.useState<boolean>(false)
const getDeviceCodeFromGitHub = async () => { const getDeviceCodeFromGitHub = async () => {
setAuthorized(false) setAuthorized(false)
@ -90,7 +87,6 @@ export const GetDeviceCode = () => {
console.log('context.rateLimit', context.rateLimit) console.log('context.rateLimit', context.rateLimit)
}, [context.rateLimit]) }, [context.rateLimit])
return ( return (
<> <>
{(context.gitHubUser && context.gitHubUser.login) ? null : {(context.gitHubUser && context.gitHubUser.login) ? null :
@ -142,6 +138,5 @@ export const GetDeviceCode = () => {
</div> : null </div> : null
} }
</>) </>)
} }

@ -35,7 +35,6 @@ export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
} }
}; };
return ( return (
<> <>
<TokenWarning /> <TokenWarning />
@ -52,4 +51,3 @@ export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
) )
} }

@ -57,7 +57,6 @@ export const GitUI = (props: IGitUi) => {
useEffect(() => { useEffect(() => {
async function setDecorators(gitState: gitState) { async function setDecorators(gitState: gitState) {
await plugin.call('fileDecorator', 'clearFileDecorators') await plugin.call('fileDecorator', 'clearFileDecorators')
await setModifiedDecorator(gitState.modified) await setModifiedDecorator(gitState.modified)
@ -70,12 +69,10 @@ export const GitUI = (props: IGitUi) => {
setDecorators(gitState) setDecorators(gitState)
}) })
}, [gitState.fileStatusResult]) }, [gitState.fileStatusResult])
useEffect(() => { useEffect(() => {
async function updatestate() { async function updatestate() {
console.log('updatestate', gitState) console.log('updatestate', gitState)
if (gitState.currentBranch && gitState.currentBranch.remote && gitState.currentBranch.remote.url) { if (gitState.currentBranch && gitState.currentBranch.remote && gitState.currentBranch.remote.url) {
@ -88,7 +85,6 @@ export const GitUI = (props: IGitUi) => {
}, [gitState.gitHubUser, gitState.currentBranch, gitState.remotes, gitState.gitHubAccessToken]) }, [gitState.gitHubUser, gitState.currentBranch, gitState.remotes, gitState.gitHubAccessToken])
const gitActionsProviderValue = { const gitActionsProviderValue = {
commit, commit,
addall, addall,
@ -192,7 +188,6 @@ export const GitUI = (props: IGitUi) => {
</> </>
</Accordion.Collapse> </Accordion.Collapse>
</Accordion> </Accordion>
</pluginActionsContext.Provider> </pluginActionsContext.Provider>
</gitActionsContext.Provider> </gitActionsContext.Provider>

@ -49,7 +49,6 @@ export const CommitsNavigation = ({ eventKey, activePanel, callback, title, bran
<SourceControlButtons branch={branch} remote={remote}></SourceControlButtons> <SourceControlButtons branch={branch} remote={remote}></SourceControlButtons>
</div> </div>
</> </>
); );

@ -26,7 +26,6 @@ export const SettingsNavigation = ({ eventKey, activePanel, callback }) => {
} }
<label className="nav pl-1 form-check-label">SETTINGS</label> <label className="nav pl-1 form-check-label">SETTINGS</label>
</span> </span>
<span className='d-flex justify-content-end align-items-center w-25'> <span className='d-flex justify-content-end align-items-center w-25'>
@ -36,7 +35,6 @@ export const SettingsNavigation = ({ eventKey, activePanel, callback }) => {
</span> </span>
</div> </div>
</> </>
); );

@ -35,7 +35,6 @@ export const SourceControlNavigation = ({ eventKey, activePanel, callback }) =>
<SourceControlButtons/> <SourceControlButtons/>
</div> </div>
</> </>
); );

@ -13,7 +13,6 @@ interface SourceControlGroupNavigationProps {
group: sourceControlGroup group: sourceControlGroup
} }
export const SourceControlGroupNavigation = (props: SourceControlGroupNavigationProps) => { export const SourceControlGroupNavigation = (props: SourceControlGroupNavigationProps) => {
const { eventKey, activePanel, callback, group } = props; const { eventKey, activePanel, callback, group } = props;
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)

@ -32,8 +32,6 @@ export const LocalBranchDetails = (props: BrancheDetailsProps) => {
} }
}, [activePanel]) }, [activePanel])
const checkout = (branch: branch) => { const checkout = (branch: branch) => {
actions.checkout({ actions.checkout({
ref: branch.name, ref: branch.name,
@ -74,7 +72,6 @@ export const LocalBranchDetails = (props: BrancheDetailsProps) => {
} }
})} })}
</div> </div>
{hasNextPage && <GitUIButton className="mb-1 ml-2 btn btn-sm" onClick={loadNextPage}>Load more</GitUIButton>} {hasNextPage && <GitUIButton className="mb-1 ml-2 btn btn-sm" onClick={loadNextPage}>Load more</GitUIButton>}
</> </>

@ -92,7 +92,6 @@ export const RemoteBranchDetails = (props: BrancheDetailsProps) => {
} }
})} })}
</div> </div>
{hasNextPage && <GitUIButton className="mb-1 ml-2 btn btn-sm" onClick={loadNextPage}>Load more</GitUIButton>} {hasNextPage && <GitUIButton className="mb-1 ml-2 btn btn-sm" onClick={loadNextPage}>Load more</GitUIButton>}
</> </>

@ -31,7 +31,6 @@ export const Clone = () => {
'' ''
); );
const clone = async () => { const clone = async () => {
await actions.clone(cloneUrl, cloneBranch, cloneDepth, !cloneAllBranches) await actions.clone(cloneUrl, cloneBranch, cloneDepth, !cloneAllBranches)
} }
@ -63,7 +62,6 @@ export const Clone = () => {
<FormControl id="cloneulr" placeholder="url" name='cloneurl' value={cloneUrl} onChange={e => onGitHubCloneUrlChange(e.target.value)} aria-describedby="urlprepend" /> <FormControl id="cloneulr" placeholder="url" name='cloneurl' value={cloneUrl} onChange={e => onGitHubCloneUrlChange(e.target.value)} aria-describedby="urlprepend" />
</InputGroup> </InputGroup>
<input name='clonebranch' onChange={e => onCloneBranchChange(e.target.value)} value={cloneBranch} className="form-control mb-1 mt-2" placeholder="branch" type="text" id="clonebranch" /> <input name='clonebranch' onChange={e => onCloneBranchChange(e.target.value)} value={cloneBranch} className="form-control mb-1 mt-2" placeholder="branch" type="text" id="clonebranch" />
<GitUIButton disabledCondition={!cloneUrl || !cloneBranch} data-id='clonebtn' className='btn btn-primary mt-1 w-100' onClick={async () => { <GitUIButton disabledCondition={!cloneUrl || !cloneBranch} data-id='clonebtn' className='btn btn-primary mt-1 w-100' onClick={async () => {
clone() clone()
@ -91,7 +89,6 @@ export const Clone = () => {
onChange={() => { }} onChange={() => { }}
/> />
<hr></hr> <hr></hr>
</>) </>)
} }

@ -3,7 +3,6 @@ import { gitActionsContext } from "../../../state/context";
import GitUIButton from "../../buttons/gituibutton"; import GitUIButton from "../../buttons/gituibutton";
import { gitPluginContext } from "../../gitui"; import { gitPluginContext } from "../../gitui";
export const Fetch = () => { export const Fetch = () => {
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)

@ -15,8 +15,6 @@ export const Merge = () => {
setLocalBranch(context.currentBranch.name) setLocalBranch(context.currentBranch.name)
}, [context.currentBranch]) }, [context.currentBranch])
const onLocalBranchChange = (value: any) => { const onLocalBranchChange = (value: any) => {
console.log('onLocalBranchChange', value) console.log('onLocalBranchChange', value)
setLocalBranch(value) setLocalBranch(value)
@ -35,21 +33,15 @@ export const Merge = () => {
}) })
setLocalBranchOptions(localBranches) setLocalBranchOptions(localBranches)
}, [context.branches]) }, [context.branches])
return ( return (
<> <>
<div className="btn-group w-100" role="group" aria-label="Basic example"> <div className="btn-group w-100" role="group" aria-label="Basic example">
<GitUIButton type="button" onClick={async () => merge()} className="btn btn-primary mr-1">Merge</GitUIButton> <GitUIButton type="button" onClick={async () => merge()} className="btn btn-primary mr-1">Merge</GitUIButton>
</div> </div>
<label>Merge from Branch</label> <label>Merge from Branch</label>
<Select <Select
options={localBranchOptions} options={localBranchOptions}
@ -62,6 +54,5 @@ export const Merge = () => {
placeholder="Type to search for a branch..." placeholder="Type to search for a branch..."
/> />
</>) </>)
} }

@ -24,8 +24,6 @@ export const PushPull = () => {
} }
}, [context.currentBranch]) }, [context.currentBranch])
const onRemoteBranchChange = (value: string) => { const onRemoteBranchChange = (value: string) => {
setRemoteBranch(value) setRemoteBranch(value)
} }
@ -56,7 +54,6 @@ export const PushPull = () => {
actions.pull(context.upstream.remote, localBranch, remoteBranch) actions.pull(context.upstream.remote, localBranch, remoteBranch)
} }
useEffect(() => { useEffect(() => {
console.log('context branches', context.branches) console.log('context branches', context.branches)
// map context.repositories to options // map context.repositories to options
@ -89,24 +86,19 @@ export const PushPull = () => {
}, [context.remotes]) }, [context.remotes])
const pushPullIsDisabled = () => { const pushPullIsDisabled = () => {
return localBranch === '' || remoteBranch === '' || !context.upstream || context.remotes.length === 0 return localBranch === '' || remoteBranch === '' || !context.upstream || context.remotes.length === 0
} }
return ( return (
<> <>
<div className="btn-group w-100" role="group"> <div className="btn-group w-100" role="group">
<GitUIButton disabledCondition={pushPullIsDisabled()} type="button" onClick={async () => pull()} className="btn btn-primary mr-1">Pull</GitUIButton> <GitUIButton disabledCondition={pushPullIsDisabled()} type="button" onClick={async () => pull()} className="btn btn-primary mr-1">Pull</GitUIButton>
<GitUIButton disabledCondition={pushPullIsDisabled()} type="button" onClick={async () => push()} className="btn btn-primary">Push</GitUIButton> <GitUIButton disabledCondition={pushPullIsDisabled()} type="button" onClick={async () => push()} className="btn btn-primary">Push</GitUIButton>
</div> </div>
<label>Local Branch</label> <label>Local Branch</label>
<Select <Select
options={localBranchOptions} options={localBranchOptions}
@ -143,7 +135,6 @@ export const PushPull = () => {
placeholder="Type to search for a branch..." placeholder="Type to search for a branch..."
/> />
<div className="mt-2 remixui_compilerConfig custom-control custom-checkbox"> <div className="mt-2 remixui_compilerConfig custom-control custom-checkbox">
<input checked={force} onChange={e => onForceChange(e)} className="remixui_autocompile custom-control-input" type="checkbox" data-id="compilerContainerAutoCompile" id="forcepush" title="Force Push" /> <input checked={force} onChange={e => onForceChange(e)} className="remixui_autocompile custom-control-input" type="checkbox" data-id="compilerContainerAutoCompile" id="forcepush" title="Force Push" />
<label className="form-check-label custom-control-label" htmlFor="forcepush">Force push</label> <label className="form-check-label custom-control-label" htmlFor="forcepush">Force push</label>

@ -8,7 +8,6 @@ import { BranchDifferences } from "./branches/branchdifferences";
import { CommitDetails } from "./commits/commitdetails"; import { CommitDetails } from "./commits/commitdetails";
import { CommitSummary } from "./commits/commitsummary"; import { CommitSummary } from "./commits/commitsummary";
export const Commits = () => { export const Commits = () => {
const [hasNextPage, setHasNextPage] = React.useState(true) const [hasNextPage, setHasNextPage] = React.useState(true)
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)

@ -29,7 +29,6 @@ export const CommitDetailsItems = (props: CCommitDetailsItemsProps) => {
{status && status.indexOf("deleted") === -1 ? <></> : <span>D</span>} {status && status.indexOf("deleted") === -1 ? <></> : <span>D</span>}
{status && status.indexOf("added") === -1 ? <></> : <span>A</span>} {status && status.indexOf("added") === -1 ? <></> : <span>A</span>}
</>) </>)
} }
return (<> return (<>

@ -46,8 +46,6 @@ export const CommitSummary = (props: CommitSummaryProps) => {
{commit.commit.author.name || ""} {commit.commit.author.name || ""}
<span className="ml-1">{getDate(commit)}</span> <span className="ml-1">{getDate(commit)}</span>
</> </>
) )
} }

@ -5,7 +5,6 @@ import axios from "axios";
import { CopyToClipboard } from "@remix-ui/clipboard"; import { CopyToClipboard } from "@remix-ui/clipboard";
import { Card } from "react-bootstrap"; import { Card } from "react-bootstrap";
export const GitHubAuth = () => { export const GitHubAuth = () => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
@ -27,7 +26,6 @@ export const GitHubAuth = () => {
console.log('context.rateLimit', context.rateLimit) console.log('context.rateLimit', context.rateLimit)
}, [context.rateLimit]) }, [context.rateLimit])
return ( return (
<> <>
{(context.gitHubUser && context.gitHubUser.login) ? null : {(context.gitHubUser && context.gitHubUser.login) ? null :
@ -49,6 +47,5 @@ export const GitHubAuth = () => {
</div>: null </div>: null
} }
</>) </>)
} }

@ -8,7 +8,6 @@ import { useIntl, FormattedMessage } from "react-intl";
import { CopyToClipboard } from "@remix-ui/clipboard"; import { CopyToClipboard } from "@remix-ui/clipboard";
import { FormControl, InputGroup } from "react-bootstrap"; import { FormControl, InputGroup } from "react-bootstrap";
export const GitHubCredentials = () => { export const GitHubCredentials = () => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const pluginactions = React.useContext(pluginActionsContext) const pluginactions = React.useContext(pluginActionsContext)
@ -62,7 +61,6 @@ export const GitHubCredentials = () => {
}) })
} }
return ( return (
<> <>
<div className="input-group text-secondary mb-1 h6"> <div className="input-group text-secondary mb-1 h6">

@ -24,7 +24,6 @@ export const Remotes = () => {
}) })
} }
useEffect(() => { useEffect(() => {
console.log('SHOW REMOTES', context.remotes) console.log('SHOW REMOTES', context.remotes)
}, [context.remotes]) }, [context.remotes])
@ -32,7 +31,6 @@ export const Remotes = () => {
return ( return (
<> <>
{context.remotes && context.remotes.length ? {context.remotes && context.remotes.length ?
<> <>

@ -8,7 +8,6 @@ import { selectStyles, selectTheme } from "../../types/styles";
import { TokenWarning } from "./tokenWarning"; import { TokenWarning } from "./tokenWarning";
import RepositorySelect from "../github/repositoryselect"; import RepositorySelect from "../github/repositoryselect";
export const RemotesImport = () => { export const RemotesImport = () => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
@ -48,7 +47,6 @@ export const RemotesImport = () => {
setRepo(repo) setRepo(repo)
} }
useEffect(() => { useEffect(() => {
console.log('OTIONS', repoOtions) console.log('OTIONS', repoOtions)
},[repoOtions]) },[repoOtions])
@ -77,8 +75,6 @@ export const RemotesImport = () => {
<input placeholder="remote name" name='remotename' onChange={e => onRemoteNameChange(e.target.value)} value={remoteName} className="form-control mb-2" type="text" id="remotename" /> <input placeholder="remote name" name='remotename' onChange={e => onRemoteNameChange(e.target.value)} value={remoteName} className="form-control mb-2" type="text" id="remotename" />
: null} : null}
{repo && remoteName ? {repo && remoteName ?
<button data-id='clonebtn' className='btn btn-primary mt-1 w-100' onClick={async () => { <button data-id='clonebtn' className='btn btn-primary mt-1 w-100' onClick={async () => {
await addRemote() await addRemote()
@ -88,4 +84,3 @@ export const RemotesImport = () => {
) )
} }

@ -8,7 +8,6 @@ import { useIntl, FormattedMessage } from "react-intl";
import { CopyToClipboard } from "@remix-ui/clipboard"; import { CopyToClipboard } from "@remix-ui/clipboard";
import { FormControl, InputGroup } from "react-bootstrap"; import { FormControl, InputGroup } from "react-bootstrap";
export const Settings = () => { export const Settings = () => {
const [githubToken, setGithubToken] = React.useState('') const [githubToken, setGithubToken] = React.useState('')
@ -18,8 +17,6 @@ export const Settings = () => {
const gitAccessTokenLink = 'https://github.com/settings/tokens/new?scopes=gist,repo&description=Remix%20IDE%20Token' const gitAccessTokenLink = 'https://github.com/settings/tokens/new?scopes=gist,repo&description=Remix%20IDE%20Token'
function handleChangeTokenState(e: string): void { function handleChangeTokenState(e: string): void {
throw new Error("Function not implemented."); throw new Error("Function not implemented.");
} }
@ -40,7 +37,6 @@ export const Settings = () => {
throw new Error("Function not implemented."); throw new Error("Function not implemented.");
} }
return ( return (
<> <>
<input name='githubToken' onChange={e => handleChangeUserNameState(e.target.value)} value={githubToken} className="form-control mb-2" placeholder="GitHub token" type="text" id="githubToken" /> <input name='githubToken' onChange={e => handleChangeUserNameState(e.target.value)} value={githubToken} className="form-control mb-2" placeholder="GitHub token" type="text" id="githubToken" />

@ -10,7 +10,6 @@ export const SourceControl = () => {
const pluginactions = React.useContext(pluginActionsContext) const pluginactions = React.useContext(pluginActionsContext)
const [show, setShow] = useState(false) const [show, setShow] = useState(false)
useEffect(() => { useEffect(() => {
if (context.fileStatusResult) { if (context.fileStatusResult) {
console.log(context) console.log(context)

@ -28,10 +28,8 @@ export const getFilesByStatus = (status: string, files: fileStatusResult[]): fil
export const getFilesWithNotModifiedStatus = (files: fileStatusResult[]): fileStatusResult[] => { export const getFilesWithNotModifiedStatus = (files: fileStatusResult[]): fileStatusResult[] => {
const result: fileStatusResult[] = [] const result: fileStatusResult[] = []
files.map((m) => { files.map((m) => {
if (m.statusNames !== undefined) { if (m.statusNames !== undefined) {
if (m.statusNames && m.statusNames.indexOf("unmodified") === -1) { if (m.statusNames && m.statusNames.indexOf("unmodified") === -1) {
result.push(m) result.push(m)
@ -50,7 +48,6 @@ export const allChangedButNotStagedFiles = (files: fileStatusResult[]): fileStat
return allfiles; return allfiles;
} }
export const getFileStatusForFile = (filename: string, files: fileStatusResult[]) => { export const getFileStatusForFile = (filename: string, files: fileStatusResult[]) => {
for (let i: number = 0; i < files.length; i++) { for (let i: number = 0; i < files.length; i++) {
if (files[i].filename === filename) if (files[i].filename === filename)

@ -147,7 +147,6 @@ export const showCurrentBranch = async () => {
const branch = await currentBranch(); const branch = await currentBranch();
const currentcommitoid = await getCommitFromRef("HEAD"); const currentcommitoid = await getCommitFromRef("HEAD");
if (typeof branch === "undefined" || branch.name === "") { if (typeof branch === "undefined" || branch.name === "") {
//toast.warn(`You are in a detached state`); //toast.warn(`You are in a detached state`);
plugin.call('notification', 'alert', { plugin.call('notification', 'alert', {
@ -288,7 +287,6 @@ export const add = async (args: string | undefined) => {
} }
} }
const getLastCommmit = async () => { const getLastCommmit = async () => {
try { try {
let currentcommitoid = ""; let currentcommitoid = "";
@ -299,7 +297,6 @@ const getLastCommmit = async () => {
} }
} }
export const rm = async (args: any) => { export const rm = async (args: any) => {
const filename = args; const filename = args;
await plugin.call("dGitProvider", "rm", { await plugin.call("dGitProvider", "rm", {
@ -308,7 +305,6 @@ export const rm = async (args: any) => {
plugin.call('notification', 'toast', `Removed ${filename} from git`) plugin.call('notification', 'toast', `Removed ${filename} from git`)
} }
export const checkoutfile = async (filename: string) => { export const checkoutfile = async (filename: string) => {
const oid = await getLastCommmit(); const oid = await getLastCommmit();
if (oid) if (oid)
@ -426,7 +422,6 @@ const tokenWarning = async () => {
} }
} }
const parseError = async (e: any) => { const parseError = async (e: any) => {
console.log(e) console.log(e)
// if message conttains 401 Unauthorized, show token warning // if message conttains 401 Unauthorized, show token warning
@ -462,7 +457,7 @@ const parseError = async (e: any) => {
} else if (e.toString().includes('NotFoundError') && !e.toString().includes('fetch')) { } else if (e.toString().includes('NotFoundError') && !e.toString().includes('fetch')) {
await plugin.call('notification', 'modal', { await plugin.call('notification', 'modal', {
title: 'Remote branch not found', title: 'Remote branch not found',
message: 'The branch you are trying to fetch does not exist on the remote.\ If you have forked this branch from another branch, you may need to fetch the original branch first or publish this branch on the remote.', message: 'The branch you are trying to fetch does not exist on the remote. If you have forked this branch from another branch, you may need to fetch the original branch first or publish this branch on the remote.',
okLabel: 'OK', okLabel: 'OK',
type: ModalTypes.alert type: ModalTypes.alert
}) })
@ -484,7 +479,7 @@ export const repositories = async () => {
let hasMoreData = true let hasMoreData = true
const per_page = 100 const per_page = 100
while (hasMoreData) { while (hasMoreData) {
let pagedResponse = await plugin.call('dGitProvider' as any, 'repositories', { token, page: page, per_page: per_page }) const pagedResponse = await plugin.call('dGitProvider' as any, 'repositories', { token, page: page, per_page: per_page })
if (pagedResponse.length < per_page) { if (pagedResponse.length < per_page) {
hasMoreData = false hasMoreData = false
} }
@ -520,7 +515,7 @@ export const remoteBranches = async (owner: string, repo: string) => {
let hasMoreData = true let hasMoreData = true
const per_page = 100 const per_page = 100
while (hasMoreData) { while (hasMoreData) {
let pagedResponse = await plugin.call('dGitProvider' as any, 'remotebranches', { token, owner, repo, page: page, per_page: per_page }) const pagedResponse = await plugin.call('dGitProvider' as any, 'remotebranches', { token, owner, repo, page: page, per_page: per_page })
if (pagedResponse.length < per_page) { if (pagedResponse.length < per_page) {
hasMoreData = false hasMoreData = false
} }
@ -628,8 +623,6 @@ export const getGitHubUser = async () => {
} }
} }
export const statusMatrix = async (filepaths: string[]) => { export const statusMatrix = async (filepaths: string[]) => {
const matrix = await plugin.call("dGitProvider", "status", { ref: "HEAD", filepaths: filepaths || ['.']}); const matrix = await plugin.call("dGitProvider", "status", { ref: "HEAD", filepaths: filepaths || ['.']});
const result = (matrix || []).map((x) => { const result = (matrix || []).map((x) => {
@ -734,7 +727,6 @@ async function getRepoDetails(url: string) {
return { owner, repo }; return { owner, repo };
} }
export const fetchBranch = async (branch: branch, page: number) => { export const fetchBranch = async (branch: branch, page: number) => {
if (!branch.remote || !branch.remote.url) return if (!branch.remote || !branch.remote.url) return
const token = await tokenWarning(); const token = await tokenWarning();

@ -105,7 +105,6 @@ export const setCallBacks = (viewPlugin: ViewPlugin, gitDispatcher: React.Dispat
await getGitConfig() await getGitConfig()
}) })
callBackEnabled = true; callBackEnabled = true;
} }
@ -186,8 +185,6 @@ const getStorageUsed = async () => {
} }
} }
export const disableCallBacks = async () => { export const disableCallBacks = async () => {
callBackEnabled = false; callBackEnabled = false;
} }

@ -38,7 +38,6 @@ export const saveToken = async (token: string) => {
await plugin.call('config', 'setAppParameter', 'settings/gist-access-token', token) await plugin.call('config', 'setAppParameter', 'settings/gist-access-token', token)
} }
export const setFileDecorators = async (files: fileStatusResult[]) => { export const setFileDecorators = async (files: fileStatusResult[]) => {
if (!plugin) return if (!plugin) return
@ -46,7 +45,6 @@ export const setFileDecorators = async (files: fileStatusResult[]) => {
const untracked = getFilesByStatus('untracked', files) const untracked = getFilesByStatus('untracked', files)
const unmodified = getFilesByStatus('unmodified', files) const unmodified = getFilesByStatus('unmodified', files)
await setModifiedDecorator(modified) await setModifiedDecorator(modified)
await setUntrackedDecorator(untracked) await setUntrackedDecorator(untracked)
unmodified.forEach((file) => { unmodified.forEach((file) => {
@ -54,7 +52,6 @@ export const setFileDecorators = async (files: fileStatusResult[]) => {
}) })
} }
export const setModifiedDecorator = async (files: fileStatusResult[]) => { export const setModifiedDecorator = async (files: fileStatusResult[]) => {
const decorators: fileDecoration[] = [] const decorators: fileDecoration[] = []
for (const file of files) { for (const file of files) {
@ -101,4 +98,3 @@ export const clearFileDecorator = async(path: string) => {
await plugin.call('fileDecorator', 'clearFileDecorators', path) await plugin.call('fileDecorator', 'clearFileDecorators', path)
} }

@ -72,7 +72,6 @@ export const setGitHubAccessToken = (token: string) => {
} }
} }
export const setLoading = (loading: boolean) => { export const setLoading = (loading: boolean) => {
return { return {
type: 'SET_LOADING', type: 'SET_LOADING',

@ -23,8 +23,7 @@ export const gitReducer = (state: gitState = defaultGitState, action: Action): g
} }
case 'FILE_STATUS_MERGE': case 'FILE_STATUS_MERGE':
const filesStatusResults: fileStatusResult[] = action.payload action.payload.map((fileStatusResult: fileStatusResult) => {
filesStatusResults.map((fileStatusResult: fileStatusResult) => {
const file = state.fileStatusResult.find(stateFile => { const file = state.fileStatusResult.find(stateFile => {
return stateFile.filename === fileStatusResult.filename return stateFile.filename === fileStatusResult.filename
}) })
@ -149,7 +148,6 @@ export const gitReducer = (state: gitState = defaultGitState, action: Action): g
case 'SET_BRANCH_DIFFERENCES': case 'SET_BRANCH_DIFFERENCES':
state.branchDifferences[`${(action as setBranchDifferencesAction).payload.remote.remote}/${(action as setBranchDifferencesAction).payload.branch.name}`] = (action as setBranchDifferencesAction).payload.branchDifference state.branchDifferences[`${(action as setBranchDifferencesAction).payload.remote.remote}/${(action as setBranchDifferencesAction).payload.branch.name}`] = (action as setBranchDifferencesAction).payload.branchDifference
return { return {
@ -157,8 +155,6 @@ export const gitReducer = (state: gitState = defaultGitState, action: Action): g
branchDifferences: { ...state.branchDifferences } branchDifferences: { ...state.branchDifferences }
} }
case 'SET_GITHUB_ACCESS_TOKEN':
case 'SET_GITHUB_USER': case 'SET_GITHUB_USER':
return { return {
...state, ...state,
@ -191,26 +187,22 @@ export const gitReducer = (state: gitState = defaultGitState, action: Action): g
} }
case 'SET_LOG': case 'SET_LOG':
const previousLog = [...state.log] if (state.log.length > 0 && state.log[[...state.log].length - 1].message === action.payload.message) {
// check if the new message is the same as the last
if (previousLog.length > 0 && previousLog[previousLog.length - 1].message === action.payload.message) {
return { return {
...state, ...state,
log: previousLog log: [...state.log]
} }
} }
return { return {
...state, ...state,
log: [...previousLog, action.payload] log: [...state.log, action.payload]
} }
case 'CLEAR_LOG': case 'CLEAR_LOG':
return { return {
...state, ...state,
log: [] log: []
} }
} }
} }

@ -4,7 +4,6 @@ import './remix-ui-grid-cell.css'
import FiltersContext from "./filtersContext" import FiltersContext from "./filtersContext"
import { CustomTooltip } from '@remix-ui/helper' import { CustomTooltip } from '@remix-ui/helper'
declare global { declare global {
interface Window { interface Window {
_paq: any _paq: any

@ -9,7 +9,6 @@ import 'react-multi-carousel/lib/styles.css'
import CustomNavButtons from './customNavButtons' import CustomNavButtons from './customNavButtons'
import { appPlatformTypes, platformContext } from '@remix-ui/app' import { appPlatformTypes, platformContext } from '@remix-ui/app'
declare global { declare global {
interface Window { interface Window {
_paq: any _paq: any

@ -3,8 +3,6 @@ import { Dropdown, DropdownButton } from 'react-bootstrap'
import DropdownItem from 'react-bootstrap/DropdownItem' import DropdownItem from 'react-bootstrap/DropdownItem'
import { localeLang } from './types/carouselTypes' import { localeLang } from './types/carouselTypes'
export function LanguageOptions({ plugin }: { plugin: any }) { export function LanguageOptions({ plugin }: { plugin: any }) {
const [langOptions, setLangOptions] = useState<string>() const [langOptions, setLangOptions] = useState<string>()

@ -86,7 +86,6 @@ export const createNewBlockchainAccount = async (plugin: RunTab, dispatch: React
) )
} }
export const signMessageWithAddress = (plugin: RunTab, dispatch: React.Dispatch<any>, account: string, message: string, modalContent: (hash: string, data: string) => JSX.Element, passphrase?: string) => { export const signMessageWithAddress = (plugin: RunTab, dispatch: React.Dispatch<any>, account: string, message: string, modalContent: (hash: string, data: string) => JSX.Element, passphrase?: string) => {
plugin.blockchain.signMessage(message, account, passphrase, (err, msgHash, signedData) => { plugin.blockchain.signMessage(message, account, passphrase, (err, msgHash, signedData) => {
if (err) { if (err) {

@ -170,7 +170,6 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
dispatch(clearRecorderCount()) dispatch(clearRecorderCount())
}) })
setInterval(() => { setInterval(() => {
fillAccountsList(plugin, dispatch) fillAccountsList(plugin, dispatch)
updateInstanceBalance(plugin, dispatch) updateInstanceBalance(plugin, dispatch)

@ -2,7 +2,6 @@ import { EOL } from 'os'
import { SearchResultLineLine } from '../../types' import { SearchResultLineLine } from '../../types'
import { Registry } from '@remix-project/remix-lib' import { Registry } from '@remix-project/remix-lib'
export const getDirectory = async (dir: string, plugin: any) => { export const getDirectory = async (dir: string, plugin: any) => {
let result = [] let result = []
if (Registry.getInstance().get('platform').api.isDesktop()) { if (Registry.getInstance().get('platform').api.isDesktop()) {
@ -113,5 +112,3 @@ export const replaceTextInLine = (str: string, searchResultLine: SearchResultLin
}).join(getEOL(str)) }).join(getEOL(str))
} }

@ -92,8 +92,6 @@ export const SearchingInitialState: SearchState = {
run: false, run: false,
} }
export interface SearchInWorkspaceOptions { export interface SearchInWorkspaceOptions {
pattern: string pattern: string
path: string path: string

@ -6,7 +6,6 @@ import { TreeView, TreeViewItem } from '@remix-ui/tree-view'
import { useIntl } from 'react-intl' import { useIntl } from 'react-intl'
const _paq = (window._paq = window._paq || []) const _paq = (window._paq = window._paq || [])
export default function SolidityCompile({ contractProperties, selectedContract, help, insertValue, saveAs, plugin }: any) { export default function SolidityCompile({ contractProperties, selectedContract, help, insertValue, saveAs, plugin }: any) {
const intl = useIntl() const intl = useIntl()
const downloadFn = () => { const downloadFn = () => {

@ -290,7 +290,6 @@ export const CompilerApiMixin = (Base) => class extends Base {
}) })
this.call('compilerloader', 'getJsonBinData') this.call('compilerloader', 'getJsonBinData')
this.data.eventHandlers.onCompilationFinished = async (success, data, source, input, version) => { this.data.eventHandlers.onCompilationFinished = async (success, data, source, input, version) => {
this.compileErrors = data this.compileErrors = data
if (success) { if (success) {

@ -17,7 +17,6 @@ import './css/style.css'
import { CompilerDropdown } from './components/compiler-dropdown' import { CompilerDropdown } from './components/compiler-dropdown'
const defaultPath = 'compiler_config.json' const defaultPath = 'compiler_config.json'
declare global { declare global {
@ -160,7 +159,6 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
} }
}, [solJsonBinData]) }, [solJsonBinData])
useEffect(() => { useEffect(() => {
const currentFileName = api.currentFile const currentFileName = api.currentFile
currentFile(currentFileName) currentFile(currentFileName)

@ -181,7 +181,6 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => {
}) })
} }
const setConfigFilePath = (path: string) => { const setConfigFilePath = (path: string) => {
setState((prevState) => { setState((prevState) => {
return { ...prevState, configFilePath: path } return { ...prevState, configFilePath: path }

@ -24,7 +24,6 @@ export interface CompilerContainerProps {
solJsonBinData: iSolJsonBinData solJsonBinData: iSolJsonBinData
} }
export interface ContractSelectionProps { export interface ContractSelectionProps {
api: ICompilerApi, api: ICompilerApi,
compiledFileName: string, compiledFileName: string,

@ -11,8 +11,6 @@ import './css/style.css'
import { CustomTooltip } from '@remix-ui/helper' import { CustomTooltip } from '@remix-ui/helper'
import { appPlatformTypes, platformContext } from '@remix-ui/app' import { appPlatformTypes, platformContext } from '@remix-ui/app'
const _paq = ((window as any)._paq = (window as any)._paq || []) // eslint-disable-line @typescript-eslint/no-explicit-any const _paq = ((window as any)._paq = (window as any)._paq || []) // eslint-disable-line @typescript-eslint/no-explicit-any
interface TestObject { interface TestObject {

@ -94,7 +94,6 @@ type ErrorRendererOptions = {
} }
} }
type SlitherAnalysisResultType = { type SlitherAnalysisResultType = {
description: string, description: string,
title: string, title: string,

@ -84,7 +84,6 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
} }
}, []) }, [])
const stylePC = iconRecord.active ? 'flex-start' : 'center' const stylePC = iconRecord.active ? 'flex-start' : 'center'
return ( return (
<> <>

@ -2,7 +2,6 @@ import React from 'react'
import VyperCompile from './vyperCompile' import VyperCompile from './vyperCompile'
import { ThemeKeys, ThemeObject } from '@microlink/react-json-view' import { ThemeKeys, ThemeObject } from '@microlink/react-json-view'
interface RemixUiVyperCompileDetailsProps { interface RemixUiVyperCompileDetailsProps {
payload: any payload: any
theme?: ThemeKeys | ThemeObject theme?: ThemeKeys | ThemeObject

@ -5,8 +5,6 @@ import { FormattedMessage } from "react-intl"
import '../css/electron-menu.css' import '../css/electron-menu.css'
import { CustomTooltip } from '@remix-ui/helper' import { CustomTooltip } from '@remix-ui/helper'
export const ElectronMenu = () => { export const ElectronMenu = () => {
const platform = useContext(platformContext) const platform = useContext(platformContext)
const global = useContext(FileSystemContext) const global = useContext(FileSystemContext)

@ -2,7 +2,6 @@ import { CustomTooltip } from "@remix-ui/helper"
import React from "react" import React from "react"
import path from 'path' import path from 'path'
interface ElectronWorkspaceNameProps { interface ElectronWorkspaceNameProps {
path: string path: string
plugin: any plugin: any

@ -42,8 +42,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
} }
}, [contextMenuItems]) }, [contextMenuItems])
useEffect(() => { useEffect(() => {
if (removedContextMenuItems) { if (removedContextMenuItems) {
removeMenuItems(removedContextMenuItems) removeMenuItems(removedContextMenuItems)
@ -358,8 +356,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
} }
return ( return (
<div className="h-100 remixui_treeview" data-id="filePanelFileExplorerTree"> <div className="h-100 remixui_treeview" data-id="filePanelFileExplorerTree">
<div ref={treeRef} tabIndex={0} style={{ <div ref={treeRef} tabIndex={0} style={{

@ -19,7 +19,6 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => {
// folder to open // folder to open
const [folderToOpen, setFolderToOpen] = useState<string>() const [folderToOpen, setFolderToOpen] = useState<string>()
const onDragOver = async (e: SyntheticEvent) => { const onDragOver = async (e: SyntheticEvent) => {
e.preventDefault() e.preventDefault()
const target = await getEventTarget(e) const target = await getEventTarget(e)
@ -77,7 +76,6 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => {
} }
} }
return (<div return (<div
onDrop={onDrop} onDragOver={onDragOver} onDrop={onDrop} onDragOver={onDragOver}
className="d-flex h-100" className="d-flex h-100"

@ -53,4 +53,3 @@ export const FileSystemContext = createContext<{
dispatchUpdateGitSubmodules: () => Promise<void> dispatchUpdateGitSubmodules: () => Promise<void>
}>(null) }>(null)

@ -249,7 +249,6 @@ export const FileSystemProvider = (props: WorkspaceProps) => {
await removeRecentElectronFolder(path) await removeRecentElectronFolder(path)
} }
const dispatchUpdateGitSubmodules = async () => { const dispatchUpdateGitSubmodules = async () => {
await updateGitSubmodules() await updateGitSubmodules()
} }

@ -862,7 +862,6 @@ export const browserReducer = (state = browserInitialState, action: Actions) =>
} }
} }
case 'SET_ELECTRON_RECENT_FOLDERS': { case 'SET_ELECTRON_RECENT_FOLDERS': {
const payload: string[] = action.payload const payload: string[] = action.payload
return { return {

@ -17,7 +17,6 @@ import { appPlatformTypes, platformContext } from '@remix-ui/app'
import { ElectronMenu } from './components/electron-menu' import { ElectronMenu } from './components/electron-menu'
import { ElectronWorkspaceName } from './components/electron-workspace-name' import { ElectronWorkspaceName } from './components/electron-workspace-name'
const _paq = (window._paq = window._paq || []) const _paq = (window._paq = window._paq || [])
const canUpload = window.File || window.FileReader || window.FileList || window.Blob const canUpload = window.File || window.FileReader || window.FileList || window.Blob
@ -796,7 +795,6 @@ export function Workspace() {
{intl.formatMessage({ id: 'filePanel.uniswapV4HookBookMultiSigSwapHook' })} {intl.formatMessage({ id: 'filePanel.uniswapV4HookBookMultiSigSwapHook' })}
</option> </option>
</optgroup> </optgroup>
</select> </select>
<div id="ozcustomization" data-id="ozCustomization" ref={displayOzCustomRef} style={{ display: 'none' }} className="mb-2"> <div id="ozcustomization" data-id="ozCustomization" ref={displayOzCustomRef} style={{ display: 'none' }} className="mb-2">

@ -38,7 +38,6 @@ export const RemixUiXterminals = (props: RemixUiXterminalsProps) => {
dispatchXterm({ type: 'ADD_TERMINAL', payload: { pid, queue: '', timeStamp: Date.now(), ref: null, hidden: false } }) dispatchXterm({ type: 'ADD_TERMINAL', payload: { pid, queue: '', timeStamp: Date.now(), ref: null, hidden: false } })
}) })
plugin.on('fs', 'workingDirChanged', (path: string) => { plugin.on('fs', 'workingDirChanged', (path: string) => {
dispatchXterm({ type: 'SET_WORKING_DIR', payload: path }) dispatchXterm({ type: 'SET_WORKING_DIR', payload: path })
dispatchXterm({ type: 'ENABLE_TERMINALS', payload: null }) dispatchXterm({ type: 'ENABLE_TERMINALS', payload: null })
@ -87,7 +86,6 @@ export const RemixUiXterminals = (props: RemixUiXterminalsProps) => {
}) })
} }
const writeToTerminal = (data: string, pid: number) => { const writeToTerminal = (data: string, pid: number) => {
setTerminals(prevState => { setTerminals(prevState => {
const terminal = prevState.find(xtermState => xtermState.pid === pid) const terminal = prevState.find(xtermState => xtermState.pid === pid)

@ -5,7 +5,6 @@
import { Terminal, ITerminalAddon } from 'xterm'; import { Terminal, ITerminalAddon } from 'xterm';
interface ITerminalDimensions { interface ITerminalDimensions {
/** /**
* The number of rows in the terminal. * The number of rows in the terminal.
@ -68,7 +67,6 @@ export class FitAddon implements ITerminalAddon {
const scrollbarWidth = this._terminal.options.scrollback === 0 ? const scrollbarWidth = this._terminal.options.scrollback === 0 ?
0 : core.viewport.scrollBarWidth; 0 : core.viewport.scrollBarWidth;
const parentElementStyle = window.getComputedStyle(this._terminal.element.parentElement.parentElement); const parentElementStyle = window.getComputedStyle(this._terminal.element.parentElement.parentElement);
const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')); const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height'));
const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width'))); const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')));

Loading…
Cancel
Save