Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Adding a develop menu option to open Remix IDE #1608

Merged
merged 9 commits into from
Jan 24, 2017
1 change: 1 addition & 0 deletions interface/i18n/mist.de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"devToolsWebview": "__webview__",
"runTests": "Tests durchführen",
"logFiles": "Logdatei anzeigen",
"browsersol": "Remix öffnen",
"ethereumNode": "Ethereum Node",
"network": "Netzwerk",
"mainNetwork": "Hauptnetzwerk",
Expand Down
1 change: 1 addition & 0 deletions interface/i18n/mist.en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"devToolsWebview": "__webview__",
"runTests": "Run tests",
"logFiles": "Show log file",
"browsersol": "Open Remix",
"externalNode": "using external node",
"ethereumNode": "Ethereum Node",
"network": "Network",
Expand Down
13 changes: 11 additions & 2 deletions modules/menuItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const switchForSystem = function (options) {
} else if ('default' in options) {
return options.default;
}
return null;
};


Expand Down Expand Up @@ -357,9 +358,17 @@ let menuTempl = function (webviews) {
log = 'Couldn\'t load log file.';
}
},
},
];
}];

if (Settings.uiMode === 'mist') {
devToolsMenu.push({
label: i18n.t('mist.applicationMenu.develop.browsersol'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to use remix throughout instead of browsersol or BrowserSolidity (below).

enabled: true,
click() {
Windows.getByType('main').send('uiAction_openBrowserSolidity');
},
});
}

// add node switching menu
devToolsMenu.push({
Expand Down
11 changes: 11 additions & 0 deletions modules/preloader/mistUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ ipcRenderer.on('uiAction_runTests', (e, type) => {
}
});

// Open Browser Solidity
ipcRenderer.on('uiAction_openBrowserSolidity', () => {
Tabs.upsert('browserSol', {
position: Tabs.find().count(),
name: 'Remix',
redirect: 'https://ethereum.github.io/browser-solidity/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use https://remix.ethereum.org

});

Tracker.afterFlush(() => LocalStore.set('selectedTab', 'browserSol'));
});


// CONTEXT MENU

Expand Down