pull/4837/head
filip mertens 9 months ago
parent b51abe09c5
commit d2effb5df7
  1. 5
      libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts
  2. 2
      libs/remix-ui/xterm/src/lib/actions/index.ts
  3. 4
      libs/remix-ui/xterm/src/lib/components/remix-ui-xterminals.tsx

@ -204,13 +204,16 @@ export const CompilerApiMixin = (Base) => class extends Base {
}
resetResults() {
try {
this.currentFile = ''
this.compilationDetails = {
contractsDetails: {},
contractMap: {}
}
this.statusChanged({ key: 'none' })
// if (this.onResetResults) this.onResetResults()
} catch (e) {
// do nothing
}
}
listenToEvents () {

@ -2,8 +2,6 @@ import { Actions } from "@remix-ui/xterm"
import { Plugin } from "@remixproject/engine"
export const createTerminal = async (shell: string = '', plugin: Plugin, workingDir: string, dispatch: React.Dispatch<Actions>) => {
const shells: string[] = await plugin.call('xterm', 'getShells')
dispatch({ type: 'ADD_SHELLS', payload: shells })
const pid = await plugin.call('xterm', 'createTerminal', workingDir, shell)
dispatch({ type: 'SHOW_OUTPUT', payload: false })
dispatch({ type: 'HIDE_ALL_TERMINALS', payload: null })

@ -25,6 +25,10 @@ export const RemixUiXterminals = (props: RemixUiXterminalsProps) => {
useEffect(() => {
setTimeout(async () => {
plugin.call('xterm', 'getShells').then((shells) => {
dispatchXterm({ type: 'ADD_SHELLS', payload: shells })
})
plugin.on('xterm', 'data', async (data: string, pid: number) => {
writeToTerminal(data, pid)
})

Loading…
Cancel
Save