From d8123db8fa850d21d9bdf06e490351f2abe9a1c8 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 26 Jul 2021 15:24:16 +0200 Subject: [PATCH] do notstart WT for embedded or precodeselected cases --- apps/remix-ide/src/app.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index aa17788170..95374611f4 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -361,6 +361,10 @@ Please make a backup of your contracts and start using http://remix.ethereum.org settings ]) + + const queryParams = new QueryParams() + const params = queryParams.get() + const onAcceptMatomo = () => { _paq.push(['forgetUserOptOut']) // @TODO remove next line when https://github.com/matomo-org/matomo/commit/9e10a150585522ca30ecdd275007a882a70c6df5 is used @@ -368,12 +372,21 @@ Please make a backup of your contracts and start using http://remix.ethereum.org settings.updateMatomoAnalyticsChoice(true) const el = document.getElementById('modal-dialog') el.parentElement.removeChild(el) + startWalkthroughService() } const onDeclineMatomo = () => { settings.updateMatomoAnalyticsChoice(false) _paq.push(['optUserOut']) const el = document.getElementById('modal-dialog') el.parentElement.removeChild(el) + startWalkthroughService() + } + + const startWalkthroughService = () => { + const walkthroughService = new WalkthroughService(localStorage) + if (!params.code && !params.url && !params.minimizeterminal && !params.gist && !params.minimizesidepanel) { + walkthroughService.start() + } } // Ask to opt in to Matomo for remix, remix-alpha and remix-beta @@ -469,8 +482,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org await appManager.activatePlugin(['settings']) await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'contextualListener', 'terminal', 'fetchAndCompile', 'contentImport']) - const queryParams = new QueryParams() - const params = queryParams.get() // Set workspace after initial activation if (Array.isArray(workspace)) { @@ -505,9 +516,4 @@ Please make a backup of your contracts and start using http://remix.ethereum.org if (params.embed) framingService.embed() framingService.start(params) - - const walkthroughService = new WalkthroughService(localStorage) - if (!params.code) { - walkthroughService.start() - } }