diff --git a/src/app.js b/src/app.js index 70d7c3e947..7e027f90b3 100644 --- a/src/app.js +++ b/src/app.js @@ -416,7 +416,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const swapPanelApi = new SwapPanelApi(swapPanelComponent, verticalIconsComponent) // eslint-disable-line const mainPanelApi = new SwapPanelApi(mainPanelComponent, verticalIconsComponent) // eslint-disable-line const verticalIconsApi = new VerticalIconsApi(verticalIconsComponent) // eslint-disable-line - + registry.put({api: verticalIconsApi, name: 'verticalicon'}) registry.put({api: appManager.proxy(), name: 'pluginmanager'}) pluginManagerComponent.setApp(appManager) @@ -458,7 +458,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ) let analysis = new AnalysisTab(registry) let debug = new DebuggerTab() - const landingPage = new LandingPage(appManager, appStore) + const landingPage = new LandingPage(appManager, appStore, registry) let test = new TestTab( registry.get('filemanager').api, registry.get('filepanel').api, diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index 02e7871512..c364e9f16e 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -45,7 +45,7 @@ import Section from './section' export class LandingPage extends ApiFactory { - constructor (appManager, appStore) { + constructor (appManager, appStore, registry) { super() this.sections = [] let load = function (item) { @@ -132,7 +132,7 @@ export class LandingPage extends ApiFactory { this.sectionWorkspaceMain = [] this.sectionWorkspaceOthers = [] - defaultWorkspaces(appManager).forEach((workspace) => { + defaultWorkspaces(appManager, registry).forEach((workspace) => { if (workspace.isMain) { this.sectionWorkspaceMain.push({ label: workspace.title, diff --git a/src/app/ui/landing-page/workspace.js b/src/app/ui/landing-page/workspace.js index 9189be0a6b..695d5ee2ec 100644 --- a/src/app/ui/landing-page/workspace.js +++ b/src/app/ui/landing-page/workspace.js @@ -8,7 +8,7 @@ export class Workspace { } } -export const defaultWorkspaces = (appManager) => { +export const defaultWorkspaces = (appManager, registry) => { return [ new Workspace( 'Solidity', @@ -19,6 +19,8 @@ export const defaultWorkspaces = (appManager) => { appManager.ensureActivated('run') appManager.ensureActivated('solidityStaticAnalysis') appManager.ensureActivated('solidityUnitTesting') + registry.get('filemanager').api.switchFile() + registry.get('verticalicon').api.select('solidity') }, () => {}), new Workspace( 'Vyper', @@ -27,6 +29,8 @@ export const defaultWorkspaces = (appManager) => { () => { appManager.ensureActivated('vyper') appManager.ensureActivated('run') + registry.get('filemanager').api.switchFile() + registry.get('verticalicon').api.select('solidity') }, () => {}), new Workspace('Debugger', 'Debug transactions with remix', false, () => { appManager.ensureActivated('debugger')