From 55d2176ca951b44f8c31ace898d062588200f1f5 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 1 Mar 2021 19:21:24 +0100 Subject: [PATCH] updated the dialog --- apps/remix-ide/src/app.js | 45 +++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 5a44711266..eabbfb3678 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -115,6 +115,9 @@ const css = csjs` .centered svg polygon { fill: var(--secondary); } + .matomoBtn { + width : 100px; + } ` class App { @@ -349,32 +352,42 @@ Please make a backup of your contracts and start using http://remix.ethereum.org settings ]) + const onAcceptMatomo = () => { + _paq.push(['forgetUserOptOut']) + settings.updateMatomoAnalyticsChoice(true) + const el = document.getElementById('modal-dialog') + el.parentElement.removeChild(el) + } + const onDeclineMatomo = () => { + settings.updateMatomoAnalyticsChoice(false) + _paq.push(['optUserOut']) + const el = document.getElementById('modal-dialog') + el.parentElement.removeChild(el) + } + if (!registry.get('config').api.exists('settings/matomo-analytics')) { // Ask to opt in to Matomo for remix, remix-alpha and remix-beta // if (window.location.hostname.includes('.ethereum.org')) { - const selectInput = yo`` + modalDialog( 'Help us to improve our IDE!', - yo`
-

Remix IDE uses Matomo, an open source data analytics software to improve the use of our website.

+ yo` +
+

Remix IDE uses Matomo, an open source data analytics software, to improve the use of our website.

+

We realize that our users have sensitive information in their code and that the privacy of our users must be protected, therefor we do not store any personally identifiable information (PII).

All data collected through Matomo is stored at our own server - no data is given to third parties.

-

We do not store any personally identifiable information (PII).

-

You can change your choice in the Settings panel.

- ${selectInput} +

You can change your choice in the Settings panel anytime.

+
+ + +
`, { - label: 'Apply', - fn: () => { - settings.updateMatomoAnalyticsChoice(selectInput.checked) - if (selectInput.checked) { - _paq.push(['forgetUserOptOut']) - } else { - _paq.push(['optUserOut']) - } - } + label: '', + fn: null }, { - label: null, + label: '', fn: null } )