From 0d797436abe11cea0eab226ee78ed23025326b08 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Mon, 12 Dec 2016 09:34:39 -0200 Subject: [PATCH 1/7] Adding browser solidity menu item --- modules/menuItems.js | 13 +++++++++++-- modules/preloader/mistUI.js | 12 ++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/modules/menuItems.js b/modules/menuItems.js index 39b26a8c2..5b3100204 100644 --- a/modules/menuItems.js +++ b/modules/menuItems.js @@ -17,6 +17,7 @@ const switchForSystem = function (options) { else if ('default' in options) { return options.default; } + return null; }; @@ -358,9 +359,17 @@ let menuTempl = function (webviews) { log = 'Couldn\'t load log file.'; } }, - }, - ]; + }]; + if (Settings.uiMode === 'mist') { + devToolsMenu.push({ + label: i18n.t('mist.applicationMenu.develop.browsersol'), + enabled: true, + click() { + Windows.getByType('main').send('uiAction_openBrowserSolidity'); + }, + }); + } // add node switching menu devToolsMenu.push({ diff --git a/modules/preloader/mistUI.js b/modules/preloader/mistUI.js index 2b0c05b12..861e3b7b7 100644 --- a/modules/preloader/mistUI.js +++ b/modules/preloader/mistUI.js @@ -129,6 +129,18 @@ ipcRenderer.on('uiAction_runTests', (e, type) => { } }); +// Open Browser Solidity +ipcRenderer.on('uiAction_openBrowserSolidity', () => { + Tabs.upsert('browserSol', { + position: 1, + name: 'Browser Solidity', + redirect: 'https://ethereum.github.io/browser-solidity/', + permissions: {}, + }); + + Tracker.afterFlush(() => LocalStore.set('selectedTab', 'browserSol')); +}); + // CONTEXT MENU From 0dc787bdcba6bf12af8a79ff68987484d8814cea Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Mon, 23 Jan 2017 20:01:54 -0200 Subject: [PATCH 2/7] Adding i18n keys for Remix menu item --- interface/i18n/mist.de.i18n.json | 1 + interface/i18n/mist.en.i18n.json | 1 + modules/preloader/mistUI.js | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/i18n/mist.de.i18n.json b/interface/i18n/mist.de.i18n.json index fa21cdcc1..cb50e8798 100644 --- a/interface/i18n/mist.de.i18n.json +++ b/interface/i18n/mist.de.i18n.json @@ -42,6 +42,7 @@ "devToolsWebview": "__webview__", "runTests": "Tests durchführen", "logFiles": "Logdatei anzeigen", + "browsersol": "Remix öffnen", "ethereumNode": "Ethereum Node", "network": "Netzwerk", "mainNetwork": "Hauptnetzwerk", diff --git a/interface/i18n/mist.en.i18n.json b/interface/i18n/mist.en.i18n.json index 2b0b04f29..0d0421905 100644 --- a/interface/i18n/mist.en.i18n.json +++ b/interface/i18n/mist.en.i18n.json @@ -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", diff --git a/modules/preloader/mistUI.js b/modules/preloader/mistUI.js index 861e3b7b7..a3b94be73 100644 --- a/modules/preloader/mistUI.js +++ b/modules/preloader/mistUI.js @@ -132,10 +132,9 @@ ipcRenderer.on('uiAction_runTests', (e, type) => { // Open Browser Solidity ipcRenderer.on('uiAction_openBrowserSolidity', () => { Tabs.upsert('browserSol', { - position: 1, - name: 'Browser Solidity', + position: Tabs.find().count(), + name: 'Remix', redirect: 'https://ethereum.github.io/browser-solidity/', - permissions: {}, }); Tracker.afterFlush(() => LocalStore.set('selectedTab', 'browserSol')); From 02c3badead6075d1e39f87b22d3b25090dfdb191 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Mon, 23 Jan 2017 20:16:36 -0200 Subject: [PATCH 3/7] Moving Remix menu option UP --- modules/menuItems.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/modules/menuItems.js b/modules/menuItems.js index 5b3100204..b5b05470c 100644 --- a/modules/menuItems.js +++ b/modules/menuItems.js @@ -339,16 +339,30 @@ let menuTempl = function (webviews) { } const externalNodeMsg = (ethereumNode.isOwnNode) ? '' : ` (${i18n.t('mist.applicationMenu.develop.externalNode')})`; - devToolsMenu = [{ + devToolsMenu.push({ label: i18n.t('mist.applicationMenu.develop.devTools'), submenu: devtToolsSubMenu, - }, { + }); + + if (Settings.uiMode === 'mist') { + devToolsMenu.push({ + label: i18n.t('mist.applicationMenu.develop.browsersol'), + enabled: true, + click() { + Windows.getByType('main').send('uiAction_openBrowserSolidity'); + }, + }); + } + + devToolsMenu.push({ label: i18n.t('mist.applicationMenu.develop.runTests'), enabled: (Settings.uiMode === 'mist'), click() { Windows.getByType('main').send('uiAction_runTests', 'webview'); }, - }, { + }); + + devToolsMenu.push({ label: i18n.t('mist.applicationMenu.develop.logFiles') + externalNodeMsg, enabled: ethereumNode.isOwnNode, click() { @@ -359,17 +373,7 @@ let menuTempl = function (webviews) { log = 'Couldn\'t load log file.'; } }, - }]; - - if (Settings.uiMode === 'mist') { - devToolsMenu.push({ - label: i18n.t('mist.applicationMenu.develop.browsersol'), - enabled: true, - click() { - Windows.getByType('main').send('uiAction_openBrowserSolidity'); - }, - }); - } + }); // add node switching menu devToolsMenu.push({ From 0af127147cbad6990e0668f03944c55b2c16bf33 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Tue, 24 Jan 2017 13:16:36 -0200 Subject: [PATCH 4/7] Opening Remix on a separated popup --- modules/menuItems.js | 14 ++++++++++++-- modules/preloader/mistUI.js | 12 ------------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/modules/menuItems.js b/modules/menuItems.js index b5b05470c..c52785160 100644 --- a/modules/menuItems.js +++ b/modules/menuItems.js @@ -346,10 +346,20 @@ let menuTempl = function (webviews) { if (Settings.uiMode === 'mist') { devToolsMenu.push({ - label: i18n.t('mist.applicationMenu.develop.browsersol'), + label: i18n.t('mist.applicationMenu.develop.openRemix'), enabled: true, click() { - Windows.getByType('main').send('uiAction_openBrowserSolidity'); + Windows.createPopup('remix', { + url: 'https://remix.ethereum.org', + electronOptions: { + width: 1024, + height: 720, + center: true, + frame: true, + resizable: true, + titleBarStyle: 'default', + } + }); }, }); } diff --git a/modules/preloader/mistUI.js b/modules/preloader/mistUI.js index a3b94be73..f68eb3b2c 100644 --- a/modules/preloader/mistUI.js +++ b/modules/preloader/mistUI.js @@ -129,18 +129,6 @@ 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/', - }); - - Tracker.afterFlush(() => LocalStore.set('selectedTab', 'browserSol')); -}); - - // CONTEXT MENU const currentMousePosition = { x: 0, y: 0 }; From aa5e9db42c6785b764a47cbd3db4386300e522b0 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Tue, 24 Jan 2017 13:18:10 -0200 Subject: [PATCH 5/7] Changing display name --- interface/i18n/mist.de.i18n.json | 2 +- interface/i18n/mist.en.i18n.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/i18n/mist.de.i18n.json b/interface/i18n/mist.de.i18n.json index cb50e8798..96bf5816c 100644 --- a/interface/i18n/mist.de.i18n.json +++ b/interface/i18n/mist.de.i18n.json @@ -42,7 +42,7 @@ "devToolsWebview": "__webview__", "runTests": "Tests durchführen", "logFiles": "Logdatei anzeigen", - "browsersol": "Remix öffnen", + "openRemix": "Remix IDE öffnen", "ethereumNode": "Ethereum Node", "network": "Netzwerk", "mainNetwork": "Hauptnetzwerk", diff --git a/interface/i18n/mist.en.i18n.json b/interface/i18n/mist.en.i18n.json index 0d0421905..6f9fbca42 100644 --- a/interface/i18n/mist.en.i18n.json +++ b/interface/i18n/mist.en.i18n.json @@ -60,7 +60,7 @@ "devToolsWebview": "__webview__", "runTests": "Run tests", "logFiles": "Show log file", - "browsersol": "Open Remix", + "openRemix": "Open Remix IDE", "externalNode": "using external node", "ethereumNode": "Ethereum Node", "network": "Network", From 04c9c2f8fbca5f9399e8142441f6757b35dc9b07 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Tue, 24 Jan 2017 15:51:16 -0200 Subject: [PATCH 6/7] minor refactor --- .travis.yml | 1 + modules/menuItems.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f167f91c7..acdb2082a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,7 @@ script: - if [[ $TRAVIS_BRANCH != "master" ]]; then unset CSC_LINK CSC_KEY_PASSWORD; fi # disable macOS code-signing (production certificate) on develop branch - travis_wait 60 gulp mist --platform $GULP_PLATFORM - if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp wallet --platform $GULP_PLATFORM; fi # also build wallet if on master branch + - gulp test-mist after_success: - gulp mist-checksums --platform $GULP_PLATFORM diff --git a/modules/menuItems.js b/modules/menuItems.js index 2055c774d..7545068dd 100644 --- a/modules/menuItems.js +++ b/modules/menuItems.js @@ -298,7 +298,7 @@ let menuTempl = function (webviews) { // DEVELOP - let devToolsMenu = []; + const devToolsMenu = []; // change for wallet if (Settings.uiMode === 'mist') { From b84f158f496e2287e047f835f07dd4c2f95b0309 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Tue, 24 Jan 2017 17:12:59 -0200 Subject: [PATCH 7/7] reverting travis change --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index acdb2082a..f167f91c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,7 +68,6 @@ script: - if [[ $TRAVIS_BRANCH != "master" ]]; then unset CSC_LINK CSC_KEY_PASSWORD; fi # disable macOS code-signing (production certificate) on develop branch - travis_wait 60 gulp mist --platform $GULP_PLATFORM - if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp wallet --platform $GULP_PLATFORM; fi # also build wallet if on master branch - - gulp test-mist after_success: - gulp mist-checksums --platform $GULP_PLATFORM