Merge pull request #2871 from ethereum/better_electron_support

better electron support
pull/2874/head v0.26.2
bunsenstraat 2 years ago committed by GitHub
commit a1d888ae24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/remix-ide/src/app.js
  2. 5
      libs/remix-ui/workspace/src/lib/actions/index.ts

@ -354,10 +354,6 @@ class AppComponent {
const queryParams = new QueryParams()
const params = queryParams.get()
if (isElectron()) {
this.appManager.activatePlugin('remixd')
}
try {
this.engine.register(await this.appManager.registeredPlugins())
} catch (e) {

@ -8,6 +8,7 @@ import { createWorkspaceTemplate, getWorkspaces, loadWorkspacePreset, setPlugin,
import { QueryParams } from '@remix-project/remix-lib'
import { fetchContractFromEtherscan } from '@remix-project/core-plugin' // eslint-disable-line
import JSZip from 'jszip'
import isElectron from 'is-electron'
export * from './events'
export * from './workspace'
@ -111,6 +112,10 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
await basicWorkspaceInit(workspaces, workspaceProvider)
}
} else await basicWorkspaceInit(workspaces, workspaceProvider)
} else if (isElectron()) {
plugin.call('notification', 'toast', `connecting to localhost...`)
await basicWorkspaceInit(workspaces, workspaceProvider)
await plugin.call('manager', 'activatePlugin', 'remixd')
} else if (localStorage.getItem("currentWorkspace")) {
const index = workspaces.findIndex(element => element.name == localStorage.getItem("currentWorkspace"))
if (index !== -1) {

Loading…
Cancel
Save