Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion browser/main/modals/PreferencesModal/ConfigTab.styl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
line-height 1.2

.note-for-keymap
margin-left: 10px
font-size: 12px

.code-mirror
Expand Down
20 changes: 20 additions & 0 deletions browser/main/modals/PreferencesModal/InfoTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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'
import _ from 'lodash'

const electron = require('electron')
const { shell, remote } = electron
Expand Down Expand Up @@ -36,8 +37,21 @@ class InfoTab extends React.Component {

if (!newConfig.amaEnabled) {
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA')
this.setState({
amaMessage: 'We hope we will gain your trust'
})
} else {
this.setState({
amaMessage: 'Thank\'s for trust us'
})
}

_.debounce(() => {
this.setState({
amaMessage: ''
})
}, 3000)()

ConfigManager.set(newConfig)

store.dispatch({
Expand All @@ -46,6 +60,11 @@ class InfoTab extends React.Component {
})
}

infoMessage () {
const { amaMessage } = this.state
return amaMessage ? <p styleName='policy-confirm'>{amaMessage}</p> : null
}

render () {
return (
<div styleName='root'>
Expand Down Expand Up @@ -107,6 +126,7 @@ class InfoTab extends React.Component {
/>
Enable to send analytics to our servers<br />
<button styleName='policy-submit' onClick={(e) => this.handleSaveButtonClick(e)}>Save</button>
{this.infoMessage()}
</div>
)
}
Expand Down
4 changes: 4 additions & 0 deletions browser/main/modals/PreferencesModal/InfoTab.styl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
.policy-submit
margin-top 10px

.policy-confirm
margin-top 10px
font-size 12px

body[data-theme="dark"]
.root
color alpha($tab--dark-text-color, 80%)
2 changes: 1 addition & 1 deletion browser/main/modals/PreferencesModal/UiTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class UiTab extends React.Component {
<option value='vim'>vim</option>
<option value='emacs'>emacs</option>
</select>
<span styleName='note-for-keymap'>Please restart boostnote after you change the keymap</span>
<p styleName='note-for-keymap'>⚠️ Please restart boostnote after you change the keymap</p>
</div>
</div>

Expand Down