diff options
author | 2018-11-25 23:02:12 +0100 | |
---|---|---|
committer | 2018-11-25 23:02:12 +0100 | |
commit | 0d9c7ff6a638861d54f29bf91c82847cfa62a24c (patch) | |
tree | 1091fc0fe9b498e7b6fa69386ed2586d298d9269 /src/components/settings | |
parent | Fix delayApp issues (diff) | |
download | ferdium-app-0d9c7ff6a638861d54f29bf91c82847cfa62a24c.tar.gz ferdium-app-0d9c7ff6a638861d54f29bf91c82847cfa62a24c.tar.zst ferdium-app-0d9c7ff6a638861d54f29bf91c82847cfa62a24c.zip |
Move spellchecker to premium
Diffstat (limited to 'src/components/settings')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index b5c048ebd..b87c11fc4 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -8,6 +8,7 @@ import Form from '../../../lib/Form'; | |||
8 | import Button from '../../ui/Button'; | 8 | import Button from '../../ui/Button'; |
9 | import Toggle from '../../ui/Toggle'; | 9 | import Toggle from '../../ui/Toggle'; |
10 | import Select from '../../ui/Select'; | 10 | import Select from '../../ui/Select'; |
11 | import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; | ||
11 | 12 | ||
12 | import { FRANZ_TRANSLATION } from '../../../config'; | 13 | import { FRANZ_TRANSLATION } from '../../../config'; |
13 | 14 | ||
@@ -95,6 +96,8 @@ export default @observer class EditSettingsForm extends Component { | |||
95 | isClearingAllCache: PropTypes.bool.isRequired, | 96 | isClearingAllCache: PropTypes.bool.isRequired, |
96 | onClearAllCache: PropTypes.func.isRequired, | 97 | onClearAllCache: PropTypes.func.isRequired, |
97 | cacheSize: PropTypes.string.isRequired, | 98 | cacheSize: PropTypes.string.isRequired, |
99 | isPremiumUser: PropTypes.bool.isRequired, | ||
100 | isSpellcheckerPremiumFeature: PropTypes.bool.isRequired, | ||
98 | }; | 101 | }; |
99 | 102 | ||
100 | static contextTypes = { | 103 | static contextTypes = { |
@@ -124,6 +127,8 @@ export default @observer class EditSettingsForm extends Component { | |||
124 | isClearingAllCache, | 127 | isClearingAllCache, |
125 | onClearAllCache, | 128 | onClearAllCache, |
126 | cacheSize, | 129 | cacheSize, |
130 | isPremiumUser, | ||
131 | isSpellcheckerPremiumFeature, | ||
127 | } = this.props; | 132 | } = this.props; |
128 | const { intl } = this.context; | 133 | const { intl } = this.context; |
129 | 134 | ||
@@ -175,7 +180,16 @@ export default @observer class EditSettingsForm extends Component { | |||
175 | 180 | ||
176 | {/* Advanced */} | 181 | {/* Advanced */} |
177 | <h2 id="advanced">{intl.formatMessage(messages.headlineAdvanced)}</h2> | 182 | <h2 id="advanced">{intl.formatMessage(messages.headlineAdvanced)}</h2> |
178 | <Toggle field={form.$('enableSpellchecking')} /> | 183 | {!isPremiumUser && isSpellcheckerPremiumFeature ? ( |
184 | <PremiumFeatureContainer> | ||
185 | <Toggle | ||
186 | field={form.$('enableSpellchecking')} | ||
187 | disabled | ||
188 | /> | ||
189 | </PremiumFeatureContainer> | ||
190 | ) : ( | ||
191 | <Toggle field={form.$('enableSpellchecking')} /> | ||
192 | )} | ||
179 | <Toggle field={form.$('enableGPUAcceleration')} /> | 193 | <Toggle field={form.$('enableGPUAcceleration')} /> |
180 | <p className="settings__help">{intl.formatMessage(messages.enableGPUAccelerationInfo)}</p> | 194 | <p className="settings__help">{intl.formatMessage(messages.enableGPUAccelerationInfo)}</p> |
181 | {/* <Select field={form.$('spellcheckingLanguage')} /> */} | 195 | {/* <Select field={form.$('spellcheckingLanguage')} /> */} |