diff options
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/spellchecker/index.js | 28 | ||||
-rw-r--r-- | src/features/spellchecker/styles.js | 26 |
2 files changed, 13 insertions, 41 deletions
diff --git a/src/features/spellchecker/index.js b/src/features/spellchecker/index.js index 8b3fb7e00..8516f816c 100644 --- a/src/features/spellchecker/index.js +++ b/src/features/spellchecker/index.js | |||
@@ -12,26 +12,24 @@ export default function init(stores) { | |||
12 | reaction( | 12 | reaction( |
13 | () => stores.features.features.isSpellcheckerPremiumFeature, | 13 | () => stores.features.features.isSpellcheckerPremiumFeature, |
14 | (enabled, r) => { | 14 | (enabled, r) => { |
15 | if (enabled) { | 15 | debug('Initializing `spellchecker` feature'); |
16 | debug('Initializing `spellchecker` feature'); | ||
17 | 16 | ||
18 | // Dispose the reaction to run this only once | 17 | // Dispose the reaction to run this only once |
19 | r.dispose(); | 18 | r.dispose(); |
20 | 19 | ||
21 | const { isSpellcheckerPremiumFeature } = stores.features.features; | 20 | const { isSpellcheckerPremiumFeature } = stores.features.features; |
22 | 21 | ||
23 | config.isPremiumFeature = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_IS_PREMIUM_FEATURE; | 22 | config.isPremiumFeature = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_IS_PREMIUM_FEATURE; |
24 | 23 | ||
25 | autorun(() => { | 24 | autorun(() => { |
26 | if (!stores.user.data.isPremium && config.isPremiumFeature) { | 25 | if (!stores.user.data.isPremium && config.isPremiumFeature) { |
27 | debug('Override settings.spellcheckerEnabled flag to false'); | 26 | debug('Override settings.spellcheckerEnabled flag to false'); |
28 | 27 | ||
29 | Object.assign(stores.settings.all.app, { | 28 | Object.assign(stores.settings.all.app, { |
30 | enableSpellchecker: false, | 29 | enableSpellchecker: false, |
31 | }); | 30 | }); |
32 | } | 31 | } |
33 | }); | 32 | }); |
34 | } | ||
35 | }, | 33 | }, |
36 | ); | 34 | ); |
37 | } | 35 | } |
diff --git a/src/features/spellchecker/styles.js b/src/features/spellchecker/styles.js deleted file mode 100644 index 097368d9a..000000000 --- a/src/features/spellchecker/styles.js +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | export default (theme) => { | ||
2 | console.log(theme); | ||
3 | return ({ | ||
4 | container: { | ||
5 | background: theme.colorBackground, | ||
6 | position: 'absolute', | ||
7 | top: 0, | ||
8 | width: '100%', | ||
9 | display: 'flex', | ||
10 | 'flex-direction': 'column', | ||
11 | 'align-items': 'center', | ||
12 | 'justify-content': 'center', | ||
13 | 'z-index': 150, | ||
14 | }, | ||
15 | headline: { | ||
16 | color: theme.colorHeadline, | ||
17 | margin: [25, 0, 40], | ||
18 | 'max-width': 500, | ||
19 | 'text-align': 'center', | ||
20 | 'line-height': '1.3em', | ||
21 | }, | ||
22 | button: { | ||
23 | margin: [40, 0, 20], | ||
24 | }, | ||
25 | }); | ||
26 | }; | ||