swicth to debugger and display editor upon workspace selection

pull/1/head
yann300 6 years ago
parent 396ad1d0da
commit 2c618e248f
  1. 4
      src/app.js
  2. 4
      src/app/ui/landing-page/landing-page.js
  3. 6
      src/app/ui/landing-page/workspace.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 swapPanelApi = new SwapPanelApi(swapPanelComponent, verticalIconsComponent) // eslint-disable-line
const mainPanelApi = new SwapPanelApi(mainPanelComponent, verticalIconsComponent) // eslint-disable-line const mainPanelApi = new SwapPanelApi(mainPanelComponent, verticalIconsComponent) // eslint-disable-line
const verticalIconsApi = new VerticalIconsApi(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'}) registry.put({api: appManager.proxy(), name: 'pluginmanager'})
pluginManagerComponent.setApp(appManager) 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 analysis = new AnalysisTab(registry)
let debug = new DebuggerTab() let debug = new DebuggerTab()
const landingPage = new LandingPage(appManager, appStore) const landingPage = new LandingPage(appManager, appStore, registry)
let test = new TestTab( let test = new TestTab(
registry.get('filemanager').api, registry.get('filemanager').api,
registry.get('filepanel').api, registry.get('filepanel').api,

@ -45,7 +45,7 @@ import Section from './section'
export class LandingPage extends ApiFactory { export class LandingPage extends ApiFactory {
constructor (appManager, appStore) { constructor (appManager, appStore, registry) {
super() super()
this.sections = [] this.sections = []
let load = function (item) { let load = function (item) {
@ -132,7 +132,7 @@ export class LandingPage extends ApiFactory {
this.sectionWorkspaceMain = [] this.sectionWorkspaceMain = []
this.sectionWorkspaceOthers = [] this.sectionWorkspaceOthers = []
defaultWorkspaces(appManager).forEach((workspace) => { defaultWorkspaces(appManager, registry).forEach((workspace) => {
if (workspace.isMain) { if (workspace.isMain) {
this.sectionWorkspaceMain.push({ this.sectionWorkspaceMain.push({
label: workspace.title, label: workspace.title,

@ -8,7 +8,7 @@ export class Workspace {
} }
} }
export const defaultWorkspaces = (appManager) => { export const defaultWorkspaces = (appManager, registry) => {
return [ return [
new Workspace( new Workspace(
'Solidity', 'Solidity',
@ -19,6 +19,8 @@ export const defaultWorkspaces = (appManager) => {
appManager.ensureActivated('run') appManager.ensureActivated('run')
appManager.ensureActivated('solidityStaticAnalysis') appManager.ensureActivated('solidityStaticAnalysis')
appManager.ensureActivated('solidityUnitTesting') appManager.ensureActivated('solidityUnitTesting')
registry.get('filemanager').api.switchFile()
registry.get('verticalicon').api.select('solidity')
}, () => {}), }, () => {}),
new Workspace( new Workspace(
'Vyper', 'Vyper',
@ -27,6 +29,8 @@ export const defaultWorkspaces = (appManager) => {
() => { () => {
appManager.ensureActivated('vyper') appManager.ensureActivated('vyper')
appManager.ensureActivated('run') appManager.ensureActivated('run')
registry.get('filemanager').api.switchFile()
registry.get('verticalicon').api.select('solidity')
}, () => {}), }, () => {}),
new Workspace('Debugger', 'Debug transactions with remix', false, () => { new Workspace('Debugger', 'Debug transactions with remix', false, () => {
appManager.ensureActivated('debugger') appManager.ensureActivated('debugger')

Loading…
Cancel
Save