diff options
Diffstat (limited to 'src/components/settings/settings/EditSettingsForm.js')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 97f535594..1ec2ab614 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 | ||
@@ -82,8 +83,7 @@ const messages = defineMessages({ | |||
82 | }, | 83 | }, |
83 | }); | 84 | }); |
84 | 85 | ||
85 | @observer | 86 | export default @observer class EditSettingsForm extends Component { |
86 | export default class EditSettingsForm extends Component { | ||
87 | static propTypes = { | 87 | static propTypes = { |
88 | checkForUpdates: PropTypes.func.isRequired, | 88 | checkForUpdates: PropTypes.func.isRequired, |
89 | installUpdate: PropTypes.func.isRequired, | 89 | installUpdate: PropTypes.func.isRequired, |
@@ -96,6 +96,7 @@ export default class EditSettingsForm extends Component { | |||
96 | isClearingAllCache: PropTypes.bool.isRequired, | 96 | isClearingAllCache: PropTypes.bool.isRequired, |
97 | onClearAllCache: PropTypes.func.isRequired, | 97 | onClearAllCache: PropTypes.func.isRequired, |
98 | cacheSize: PropTypes.string.isRequired, | 98 | cacheSize: PropTypes.string.isRequired, |
99 | isSpellcheckerPremiumFeature: PropTypes.bool.isRequired, | ||
99 | }; | 100 | }; |
100 | 101 | ||
101 | static contextTypes = { | 102 | static contextTypes = { |
@@ -125,6 +126,7 @@ export default class EditSettingsForm extends Component { | |||
125 | isClearingAllCache, | 126 | isClearingAllCache, |
126 | onClearAllCache, | 127 | onClearAllCache, |
127 | cacheSize, | 128 | cacheSize, |
129 | isSpellcheckerPremiumFeature, | ||
128 | } = this.props; | 130 | } = this.props; |
129 | const { intl } = this.context; | 131 | const { intl } = this.context; |
130 | 132 | ||
@@ -161,10 +163,23 @@ export default class EditSettingsForm extends Component { | |||
161 | <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> | 163 | <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> |
162 | <Toggle field={form.$('showDisabledServices')} /> | 164 | <Toggle field={form.$('showDisabledServices')} /> |
163 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> | 165 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> |
166 | <Toggle field={form.$('darkMode')} /> | ||
164 | 167 | ||
165 | {/* Language */} | 168 | {/* Language */} |
166 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> | 169 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> |
167 | <Select field={form.$('locale')} showLabel={false} /> | 170 | <Select field={form.$('locale')} showLabel={false} /> |
171 | <PremiumFeatureContainer | ||
172 | condition={isSpellcheckerPremiumFeature} | ||
173 | > | ||
174 | <div> | ||
175 | <Toggle | ||
176 | field={form.$('enableSpellchecking')} | ||
177 | /> | ||
178 | {form.$('enableSpellchecking').value && ( | ||
179 | <Select field={form.$('spellcheckerLanguage')} /> | ||
180 | )} | ||
181 | </div> | ||
182 | </PremiumFeatureContainer> | ||
168 | <a | 183 | <a |
169 | href={FRANZ_TRANSLATION} | 184 | href={FRANZ_TRANSLATION} |
170 | target="_blank" | 185 | target="_blank" |
@@ -175,10 +190,8 @@ export default class EditSettingsForm extends Component { | |||
175 | 190 | ||
176 | {/* Advanced */} | 191 | {/* Advanced */} |
177 | <h2 id="advanced">{intl.formatMessage(messages.headlineAdvanced)}</h2> | 192 | <h2 id="advanced">{intl.formatMessage(messages.headlineAdvanced)}</h2> |
178 | <Toggle field={form.$('enableSpellchecking')} /> | ||
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')} /> */} | ||
182 | <div className="settings__settings-group"> | 195 | <div className="settings__settings-group"> |
183 | <h3> | 196 | <h3> |
184 | {intl.formatMessage(messages.subheadlineCache)} | 197 | {intl.formatMessage(messages.subheadlineCache)} |