use checkbox

pull/924/head
yann300 4 years ago committed by Liana Husikyan
parent b41040ed1e
commit ae1934af57
  1. 25
      apps/remix-ide/src/app.js

@ -351,31 +351,34 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
if (!registry.get('config').api.exists('settings/matomo-analytics')) { if (!registry.get('config').api.exists('settings/matomo-analytics')) {
// Ask to opt in to Matomo for remix, remix-alpha and remix-beta // Ask to opt in to Matomo for remix, remix-alpha and remix-beta
//if (window.location.hostname.includes('.ethereum.org')) { // if (window.location.hostname.includes('.ethereum.org')) {
const selectInput = yo`<input type="checkbox" checked='checked' />`
modalDialog( modalDialog(
'Help us to improve our IDE!', 'Help us to improve our IDE!',
yo`<div> yo`<div>
>p>Remix IDE uses <a href="https://matomo.org">Matomo</a>, an open source data analytics software to improve the use of our website.</p> <p>Remix IDE uses <a href="https://matomo.org">Matomo</a>, an open source data analytics software to improve the use of our website.</p>
<p>All data collected through Matomo is stored at our own server - no data is given to third parties.</p> <p>All data collected through Matomo is stored at our own server - no data is given to third parties.</p>
<p>We do not store any personally identifiable information (PII).</p> <p>We do not store any personally identifiable information (PII).</p>
<p>You can change your choice in the Settings panel.</p> <p>You can change your choice in the Settings panel.</p>
${selectInput}
</div>`, </div>`,
{ {
label: "Sure", label: 'Apply',
fn: () => { fn: () => {
settings.updateMatomoAnalyticsChoice(true) settings.updateMatomoAnalyticsChoice(selectInput.checked)
_paq.push(['forgetUserOptOut']) if (selectInput.checked) {
_paq.push(['forgetUserOptOut'])
} else {
_paq.push(['optUserOut'])
}
} }
}, },
{ {
label: 'Decline', label: null,
fn: () => { fn: null
settings.updateMatomoAnalyticsChoice(false)
_paq.push(['optUserOut'])
}
} }
) )
//} // }
} }
// CONTENT VIEWS & DEFAULT PLUGINS // CONTENT VIEWS & DEFAULT PLUGINS
const compileTab = new CompileTab( const compileTab = new CompileTab(

Loading…
Cancel
Save