clean out redundancies in file explorer

pull/3321/head^2
Joseph Izang 2 years ago committed by Aniket
parent 9260e7f1c0
commit 081086c4e9
  1. 10
      apps/remix-ide/src/app/panels/file-panel.js
  2. 2
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx
  3. 14
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  4. 3
      libs/remix-ui/workspace/src/lib/types/index.ts

@ -64,16 +64,6 @@ module.exports = class Filepanel extends ViewPlugin {
return <div id='fileExplorerView'><FileSystemProvider plugin={this} /></div>
}
compileContractForUml (path) {
console.log({ path })
this.call('solidity', 'compile', async (target, source) => {
console.log({
target,
source
})
})
}
/**
* @param item { id: string, name: string, type?: string[], path?: string[], extension?: string[], pattern?: string[] }
* @param callback (...args) => void

@ -23,7 +23,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
const [svgPayload, setSVGPayload] = useState('')
const [showViewer, setShowViewer] = useState(false)
const [contentForAST, setContentForAST] = useState('')
console.log({ props })
const intl = useIntl()

@ -460,15 +460,13 @@ export const FileExplorer = (props: FileExplorerProps) => {
try {
const currentFile = path
let ast: any
plugin.compileContractForUml(path)
const client: PluginClient<any, Readonly<IRemixApi>> = new PluginClient()
client.call('solidity', '')
plugin.call('solidity', '')
// client.call('solidity', 'compile', path)
// client.on('solidity', 'compilationFinished', async (target, compileSource) => {
plugin.call('solidity', 'compile', path)
plugin.on('solidity', 'compilationFinished', (file, source, languageVersion, data, input, version) => {
console.log({
file, source, languageVersion, data, input, version
})
})
// ast = parser.parse(compileSource.sources[currentFile].content)
// console.log({ ast })
// })
// contentForAST.length > 1 ? parser.parse(contentForAST) :
// const payload = vizRenderStringSync(convertUmlClasses2Dot(convertAST2UmlClasses(ast, currentFile)))
// const fileName = `${currentFile.split('/')[0]}/resources/${currentFile.split('/')[1].split('.')[0]}.pdf`

@ -45,7 +45,6 @@ export interface FileType {
}
export type FilePanelType = {
<Name extends Extract<keyof App, string>, Key extends MethodKey<App[Name]>>(name: Name, key: Key, ...payload: MethodParams<App[Name], Key>)
setWorkspace: ({ name, isLocalhost }, setEvent: boolean) => void,
createWorkspace: (name: string, workspaceTemplateName: string) => void,
renameWorkspace: (oldName: string, newName: string) => void
@ -78,7 +77,7 @@ export type FilePanelType = {
export interface FileExplorerProps {
name: string,
menuItems?: string[],
plugin: FilePanelType
plugin: any
contextMenuItems: MenuItems,
removedContextMenuItems: MenuItems,
files: { [x: string]: Record<string, FileType> },

Loading…
Cancel
Save