import React from 'react' import CSSModules from 'browser/lib/CSSModules' import styles from './InfoTab.styl' import ConfigManager from 'browser/main/lib/ConfigManager' import store from 'browser/main/store' import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig' const electron = require('electron') const { shell, remote } = electron const appVersion = remote.app.getVersion() class InfoTab extends React.Component { constructor (props) { super(props) this.state = { config: this.props.config } } handleLinkClick (e) { shell.openExternal(e.currentTarget.href) e.preventDefault() } handleConfigChange (e) { const newConfig = { amaEnabled: this.refs.amaEnabled.checked } this.setState({ config: newConfig }) } handleSaveButtonClick (e) { let newConfig = { amaEnabled: this.state.config.amaEnabled } if (!newConfig.amaEnabled) { AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA') } ConfigManager.set(newConfig) store.dispatch({ type: 'SET_CONFIG', config: newConfig }) } render () { return (
Info
Boostnote {appVersion}
An open source note-taking app made for programmers just like you.

Data collection policy

We collect only the number of DAU for Boostnote and DO NOT collect any detail information

such as your note content. You can see how it works on this.handleLinkClick(e)}>GitHub.

These data are only used for Boostnote improvements.

this.handleConfigChange(e)} checked={this.state.config.amaEnabled} ref='amaEnabled' type='checkbox' /> Enable to send analytics to our servers
) } } InfoTab.propTypes = { } export default CSSModules(InfoTab, styles)