diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-06-17 16:52:46 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-06-17 16:52:46 +0200 |
commit | 2887eee3935e75640fc45111a904e78496dab62e (patch) | |
tree | 5ecd66727b8056f62771e20bb42fca9cfde1745c /src | |
parent | Merge branch 'feature/3rd-party-limit' into feature/new-pricing (diff) | |
download | ferdium-app-2887eee3935e75640fc45111a904e78496dab62e.tar.gz ferdium-app-2887eee3935e75640fc45111a904e78496dab62e.tar.zst ferdium-app-2887eee3935e75640fc45111a904e78496dab62e.zip |
Rename feature flags
Diffstat (limited to 'src')
-rw-r--r-- | src/components/settings/recipes/RecipesDashboard.js | 8 | ||||
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 12 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 8 | ||||
-rw-r--r-- | src/config.js | 6 | ||||
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 4 | ||||
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 6 | ||||
-rw-r--r-- | src/containers/settings/RecipesScreen.js | 2 | ||||
-rw-r--r-- | src/features/communityRecipes/index.js | 4 | ||||
-rw-r--r-- | src/features/communityRecipes/store.js | 2 | ||||
-rw-r--r-- | src/features/serviceProxy/index.js | 8 | ||||
-rw-r--r-- | src/features/spellchecker/index.js | 8 | ||||
-rw-r--r-- | src/features/workspaces/store.js | 6 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 4 |
13 files changed, 40 insertions, 38 deletions
diff --git a/src/components/settings/recipes/RecipesDashboard.js b/src/components/settings/recipes/RecipesDashboard.js index ed4a429db..75e60b7ec 100644 --- a/src/components/settings/recipes/RecipesDashboard.js +++ b/src/components/settings/recipes/RecipesDashboard.js | |||
@@ -118,7 +118,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
118 | openRecipeDirectory: PropTypes.func.isRequired, | 118 | openRecipeDirectory: PropTypes.func.isRequired, |
119 | openDevDocs: PropTypes.func.isRequired, | 119 | openDevDocs: PropTypes.func.isRequired, |
120 | classes: PropTypes.object.isRequired, | 120 | classes: PropTypes.object.isRequired, |
121 | isCommunityRecipesPremiumFeature: PropTypes.bool.isRequired, | 121 | isCommunityRecipesIncludedInCurrentPlan: PropTypes.bool.isRequired, |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static defaultProps = { | 124 | static defaultProps = { |
@@ -145,7 +145,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
145 | openRecipeDirectory, | 145 | openRecipeDirectory, |
146 | openDevDocs, | 146 | openDevDocs, |
147 | classes, | 147 | classes, |
148 | isCommunityRecipesPremiumFeature, | 148 | isCommunityRecipesIncludedInCurrentPlan, |
149 | } = this.props; | 149 | } = this.props; |
150 | const { intl } = this.context; | 150 | const { intl } = this.context; |
151 | 151 | ||
@@ -218,7 +218,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
218 | <> | 218 | <> |
219 | <H2> | 219 | <H2> |
220 | {intl.formatMessage(messages.headlineCustomRecipes)} | 220 | {intl.formatMessage(messages.headlineCustomRecipes)} |
221 | {isCommunityRecipesPremiumFeature && ( | 221 | {isCommunityRecipesIncludedInCurrentPlan && ( |
222 | <ProBadge className={classes.proBadge} /> | 222 | <ProBadge className={classes.proBadge} /> |
223 | )} | 223 | )} |
224 | </H2> | 224 | </H2> |
@@ -247,7 +247,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
247 | </> | 247 | </> |
248 | )} | 248 | )} |
249 | <PremiumFeatureContainer | 249 | <PremiumFeatureContainer |
250 | condition={(recipeFilter === 'dev' && communityRecipes.length > 0) && isCommunityRecipesPremiumFeature} | 250 | condition={(recipeFilter === 'dev' && communityRecipes.length > 0) && isCommunityRecipesIncludedInCurrentPlan} |
251 | > | 251 | > |
252 | {recipeFilter === 'dev' && communityRecipes.length > 0 && ( | 252 | {recipeFilter === 'dev' && communityRecipes.length > 0 && ( |
253 | <H3>{intl.formatMessage(messages.headlineCommunityRecipes)}</H3> | 253 | <H3>{intl.formatMessage(messages.headlineCommunityRecipes)}</H3> |
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index c089a1582..5cde0db8e 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -130,8 +130,8 @@ export default @observer class EditServiceForm extends Component { | |||
130 | isSaving: PropTypes.bool.isRequired, | 130 | isSaving: PropTypes.bool.isRequired, |
131 | isDeleting: PropTypes.bool.isRequired, | 131 | isDeleting: PropTypes.bool.isRequired, |
132 | isProxyFeatureEnabled: PropTypes.bool.isRequired, | 132 | isProxyFeatureEnabled: PropTypes.bool.isRequired, |
133 | isProxyPremiumFeature: PropTypes.bool.isRequired, | 133 | isServiceProxyIncludedInCurrentPlan: PropTypes.bool.isRequired, |
134 | isSpellcheckerPremiumFeature: PropTypes.bool.isRequired, | 134 | isSpellcheckerIncludedInCurrentPlan: PropTypes.bool.isRequired, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static defaultProps = { | 137 | static defaultProps = { |
@@ -194,8 +194,8 @@ export default @observer class EditServiceForm extends Component { | |||
194 | isDeleting, | 194 | isDeleting, |
195 | onDelete, | 195 | onDelete, |
196 | isProxyFeatureEnabled, | 196 | isProxyFeatureEnabled, |
197 | isProxyPremiumFeature, | 197 | isServiceProxyIncludedInCurrentPlan, |
198 | isSpellcheckerPremiumFeature, | 198 | isSpellcheckerIncludedInCurrentPlan, |
199 | } = this.props; | 199 | } = this.props; |
200 | const { intl } = this.context; | 200 | const { intl } = this.context; |
201 | 201 | ||
@@ -345,7 +345,7 @@ export default @observer class EditServiceForm extends Component { | |||
345 | </div> | 345 | </div> |
346 | 346 | ||
347 | <PremiumFeatureContainer | 347 | <PremiumFeatureContainer |
348 | condition={isSpellcheckerPremiumFeature} | 348 | condition={!isSpellcheckerIncludedInCurrentPlan} |
349 | gaEventInfo={{ category: 'User', event: 'upgrade', label: 'spellchecker' }} | 349 | gaEventInfo={{ category: 'User', event: 'upgrade', label: 'spellchecker' }} |
350 | > | 350 | > |
351 | <div className="settings__settings-group"> | 351 | <div className="settings__settings-group"> |
@@ -355,7 +355,7 @@ export default @observer class EditServiceForm extends Component { | |||
355 | 355 | ||
356 | {isProxyFeatureEnabled && ( | 356 | {isProxyFeatureEnabled && ( |
357 | <PremiumFeatureContainer | 357 | <PremiumFeatureContainer |
358 | condition={isProxyPremiumFeature} | 358 | condition={!isServiceProxyIncludedInCurrentPlan} |
359 | gaEventInfo={{ category: 'User', event: 'upgrade', label: 'proxy' }} | 359 | gaEventInfo={{ category: 'User', event: 'upgrade', label: 'proxy' }} |
360 | > | 360 | > |
361 | <div className="settings__settings-group"> | 361 | <div className="settings__settings-group"> |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index efd453356..6d0811b1b 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -100,7 +100,7 @@ export default @observer class EditSettingsForm extends Component { | |||
100 | isClearingAllCache: PropTypes.bool.isRequired, | 100 | isClearingAllCache: PropTypes.bool.isRequired, |
101 | onClearAllCache: PropTypes.func.isRequired, | 101 | onClearAllCache: PropTypes.func.isRequired, |
102 | cacheSize: PropTypes.string.isRequired, | 102 | cacheSize: PropTypes.string.isRequired, |
103 | isSpellcheckerPremiumFeature: PropTypes.bool.isRequired, | 103 | isSpellcheckerIncludedInCurrentPlan: PropTypes.bool.isRequired, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static contextTypes = { | 106 | static contextTypes = { |
@@ -130,7 +130,7 @@ export default @observer class EditSettingsForm extends Component { | |||
130 | isClearingAllCache, | 130 | isClearingAllCache, |
131 | onClearAllCache, | 131 | onClearAllCache, |
132 | cacheSize, | 132 | cacheSize, |
133 | isSpellcheckerPremiumFeature, | 133 | isSpellcheckerIncludedInCurrentPlan, |
134 | } = this.props; | 134 | } = this.props; |
135 | const { intl } = this.context; | 135 | const { intl } = this.context; |
136 | 136 | ||
@@ -143,6 +143,8 @@ export default @observer class EditSettingsForm extends Component { | |||
143 | updateButtonLabelMessage = messages.buttonSearchForUpdate; | 143 | updateButtonLabelMessage = messages.buttonSearchForUpdate; |
144 | } | 144 | } |
145 | 145 | ||
146 | console.log('isSpellcheckerIncludedInCurrentPlan', isSpellcheckerIncludedInCurrentPlan); | ||
147 | |||
146 | return ( | 148 | return ( |
147 | <div className="settings__main"> | 149 | <div className="settings__main"> |
148 | <div className="settings__header"> | 150 | <div className="settings__header"> |
@@ -173,7 +175,7 @@ export default @observer class EditSettingsForm extends Component { | |||
173 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> | 175 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> |
174 | <Select field={form.$('locale')} showLabel={false} /> | 176 | <Select field={form.$('locale')} showLabel={false} /> |
175 | <PremiumFeatureContainer | 177 | <PremiumFeatureContainer |
176 | condition={isSpellcheckerPremiumFeature} | 178 | condition={!isSpellcheckerIncludedInCurrentPlan} |
177 | gaEventInfo={{ category: 'User', event: 'upgrade', label: 'spellchecker' }} | 179 | gaEventInfo={{ category: 'User', event: 'upgrade', label: 'spellchecker' }} |
178 | > | 180 | > |
179 | <Fragment> | 181 | <Fragment> |
diff --git a/src/config.js b/src/config.js index 544f94fde..3c8b0f0d0 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -45,16 +45,16 @@ export const DEFAULT_APP_SETTINGS = { | |||
45 | }; | 45 | }; |
46 | 46 | ||
47 | export const DEFAULT_FEATURES_CONFIG = { | 47 | export const DEFAULT_FEATURES_CONFIG = { |
48 | isSpellcheckerPremiumFeature: false, | 48 | isSpellcheckerIncludedInCurrentPlan: true, |
49 | needToWaitToProceed: false, | 49 | needToWaitToProceed: false, |
50 | needToWaitToProceedConfig: { | 50 | needToWaitToProceedConfig: { |
51 | delayOffset: ms('1h'), | 51 | delayOffset: ms('1h'), |
52 | wait: ms('10s'), | 52 | wait: ms('10s'), |
53 | }, | 53 | }, |
54 | isServiceProxyEnabled: false, | 54 | isServiceProxyEnabled: false, |
55 | isServiceProxyPremiumFeature: true, | 55 | isServiceProxyIncludedInCurrentPlan: false, |
56 | isAnnouncementsEnabled: true, | 56 | isAnnouncementsEnabled: true, |
57 | isWorkspacePremiumFeature: true, | 57 | isWorkspaceIncludedInCurrentPlan: true, |
58 | isWorkspaceEnabled: false, | 58 | isWorkspaceEnabled: false, |
59 | }; | 59 | }; |
60 | 60 | ||
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 870ca4ecd..e4ff03bb3 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -330,8 +330,8 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex | |||
330 | onSubmit={d => this.onSubmit(d)} | 330 | onSubmit={d => this.onSubmit(d)} |
331 | onDelete={() => this.deleteService()} | 331 | onDelete={() => this.deleteService()} |
332 | isProxyFeatureEnabled={proxyFeature.isEnabled} | 332 | isProxyFeatureEnabled={proxyFeature.isEnabled} |
333 | isProxyPremiumFeature={proxyFeature.isPremium} | 333 | isServiceProxyIncludedInCurrentPlan={proxyFeature.isIncludedInCurrentPlan} |
334 | isSpellcheckerPremiumFeature={spellcheckerFeature.isPremium} | 334 | isSpellcheckerIncludedInCurrentPlan={spellcheckerFeature.isIncludedInCurrentPlan} |
335 | /> | 335 | /> |
336 | </ErrorBoundary> | 336 | </ErrorBoundary> |
337 | ); | 337 | ); |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 97c1fa3b1..67d52f102 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -159,8 +159,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
159 | }, | 159 | }, |
160 | enableSpellchecking: { | 160 | enableSpellchecking: { |
161 | label: intl.formatMessage(messages.enableSpellchecking), | 161 | label: intl.formatMessage(messages.enableSpellchecking), |
162 | value: !this.props.stores.user.data.isPremium && spellcheckerConfig.isPremium ? false : settings.all.app.enableSpellchecking, | 162 | value: !this.props.stores.user.data.isPremium && !spellcheckerConfig.isIncludedInCurrentPlan ? false : settings.all.app.enableSpellchecking, |
163 | default: !this.props.stores.user.data.isPremium && spellcheckerConfig.isPremium ? false : DEFAULT_APP_SETTINGS.enableSpellchecking, | 163 | default: !this.props.stores.user.data.isPremium && !spellcheckerConfig.isIncludedInCurrentPlan ? false : DEFAULT_APP_SETTINGS.enableSpellchecking, |
164 | }, | 164 | }, |
165 | spellcheckerLanguage: { | 165 | spellcheckerLanguage: { |
166 | label: intl.formatMessage(globalMessages.spellcheckerLanguage), | 166 | label: intl.formatMessage(globalMessages.spellcheckerLanguage), |
@@ -223,7 +223,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
223 | cacheSize={cacheSize} | 223 | cacheSize={cacheSize} |
224 | isClearingAllCache={isClearingAllCache} | 224 | isClearingAllCache={isClearingAllCache} |
225 | onClearAllCache={clearAllCache} | 225 | onClearAllCache={clearAllCache} |
226 | isSpellcheckerPremiumFeature={spellcheckerConfig.isPremium} | 226 | isSpellcheckerIncludedInCurrentPlan={spellcheckerConfig.isIncludedInCurrentPlan} |
227 | /> | 227 | /> |
228 | </ErrorBoundary> | 228 | </ErrorBoundary> |
229 | ); | 229 | ); |
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 57e879f42..132820b6f 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -128,7 +128,7 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
128 | appActions.openExternalUrl({ url: FRANZ_DEV_DOCS }); | 128 | appActions.openExternalUrl({ url: FRANZ_DEV_DOCS }); |
129 | gaEvent('Recipe', 'open-dev-docs', 'Developer Documentation'); | 129 | gaEvent('Recipe', 'open-dev-docs', 'Developer Documentation'); |
130 | }} | 130 | }} |
131 | isCommunityRecipesPremiumFeature={communityRecipesStore.isCommunityRecipesPremiumFeature} | 131 | isCommunityRecipesIncludedInCurrentPlan={communityRecipesStore.isCommunityRecipesIncludedInCurrentPlan} |
132 | isUserPremiumUser={user.isPremium} | 132 | isUserPremiumUser={user.isPremium} |
133 | /> | 133 | /> |
134 | </ErrorBoundary> | 134 | </ErrorBoundary> |
diff --git a/src/features/communityRecipes/index.js b/src/features/communityRecipes/index.js index 78e87855e..4d050f90e 100644 --- a/src/features/communityRecipes/index.js +++ b/src/features/communityRecipes/index.js | |||
@@ -15,11 +15,11 @@ export default function initCommunityRecipes(stores, actions) { | |||
15 | // Toggle communityRecipe premium status | 15 | // Toggle communityRecipe premium status |
16 | reaction( | 16 | reaction( |
17 | () => ( | 17 | () => ( |
18 | features.features.isCommunityRecipesPremiumFeature | 18 | features.features.isCommunityRecipesIncludedInCurrentPlan |
19 | ), | 19 | ), |
20 | (isPremiumFeature) => { | 20 | (isPremiumFeature) => { |
21 | debug('Community recipes is premium feature: ', isPremiumFeature); | 21 | debug('Community recipes is premium feature: ', isPremiumFeature); |
22 | communityRecipesStore.isCommunityRecipesPremiumFeature = isPremiumFeature; | 22 | communityRecipesStore.isCommunityRecipesIncludedInCurrentPlan = isPremiumFeature; |
23 | }, | 23 | }, |
24 | { | 24 | { |
25 | fireImmediately: true, | 25 | fireImmediately: true, |
diff --git a/src/features/communityRecipes/store.js b/src/features/communityRecipes/store.js index 165b753e8..4d45c3b33 100644 --- a/src/features/communityRecipes/store.js +++ b/src/features/communityRecipes/store.js | |||
@@ -4,7 +4,7 @@ import { FeatureStore } from '../utils/FeatureStore'; | |||
4 | const debug = require('debug')('Franz:feature:communityRecipes:store'); | 4 | const debug = require('debug')('Franz:feature:communityRecipes:store'); |
5 | 5 | ||
6 | export class CommunityRecipesStore extends FeatureStore { | 6 | export class CommunityRecipesStore extends FeatureStore { |
7 | @observable isCommunityRecipesPremiumFeature = false; | 7 | @observable isCommunityRecipesIncludedInCurrentPlan = false; |
8 | 8 | ||
9 | start(stores, actions) { | 9 | start(stores, actions) { |
10 | debug('start'); | 10 | debug('start'); |
diff --git a/src/features/serviceProxy/index.js b/src/features/serviceProxy/index.js index 4bea327ad..55c600de4 100644 --- a/src/features/serviceProxy/index.js +++ b/src/features/serviceProxy/index.js | |||
@@ -9,17 +9,17 @@ const debug = require('debug')('Franz:feature:serviceProxy'); | |||
9 | 9 | ||
10 | export const config = observable({ | 10 | export const config = observable({ |
11 | isEnabled: DEFAULT_FEATURES_CONFIG.isServiceProxyEnabled, | 11 | isEnabled: DEFAULT_FEATURES_CONFIG.isServiceProxyEnabled, |
12 | isPremium: DEFAULT_FEATURES_CONFIG.isServiceProxyPremiumFeature, | 12 | isPremium: DEFAULT_FEATURES_CONFIG.isServiceProxyIncludedInCurrentPlan, |
13 | }); | 13 | }); |
14 | 14 | ||
15 | export default function init(stores) { | 15 | export default function init(stores) { |
16 | debug('Initializing `serviceProxy` feature'); | 16 | debug('Initializing `serviceProxy` feature'); |
17 | 17 | ||
18 | autorun(() => { | 18 | autorun(() => { |
19 | const { isServiceProxyEnabled, isServiceProxyPremiumFeature } = stores.features.features; | 19 | const { isServiceProxyEnabled, isServiceProxyIncludedInCurrentPlan } = stores.features.features; |
20 | 20 | ||
21 | config.isEnabled = isServiceProxyEnabled !== undefined ? isServiceProxyEnabled : DEFAULT_FEATURES_CONFIG.isServiceProxyEnabled; | 21 | config.isEnabled = isServiceProxyEnabled !== undefined ? isServiceProxyEnabled : DEFAULT_FEATURES_CONFIG.isServiceProxyEnabled; |
22 | config.isPremium = isServiceProxyPremiumFeature !== undefined ? isServiceProxyPremiumFeature : DEFAULT_FEATURES_CONFIG.isServiceProxyPremiumFeature; | 22 | config.isIncludedInCurrentPlan = isServiceProxyIncludedInCurrentPlan !== undefined ? isServiceProxyIncludedInCurrentPlan : DEFAULT_FEATURES_CONFIG.isServiceProxyIncludedInCurrentPlan; |
23 | 23 | ||
24 | const services = stores.services.enabled; | 24 | const services = stores.services.enabled; |
25 | const isPremiumUser = stores.user.data.isPremium; | 25 | const isPremiumUser = stores.user.data.isPremium; |
@@ -30,7 +30,7 @@ export default function init(stores) { | |||
30 | services.forEach((service) => { | 30 | services.forEach((service) => { |
31 | const s = session.fromPartition(`persist:service-${service.id}`); | 31 | const s = session.fromPartition(`persist:service-${service.id}`); |
32 | 32 | ||
33 | if (config.isEnabled && (isPremiumUser || !config.isPremium)) { | 33 | if (config.isEnabled && (isPremiumUser || !config.isIncludedInCurrentPlan)) { |
34 | const serviceProxyConfig = proxySettings[service.id]; | 34 | const serviceProxyConfig = proxySettings[service.id]; |
35 | 35 | ||
36 | if (serviceProxyConfig && serviceProxyConfig.isEnabled && serviceProxyConfig.host) { | 36 | if (serviceProxyConfig && serviceProxyConfig.isEnabled && serviceProxyConfig.host) { |
diff --git a/src/features/spellchecker/index.js b/src/features/spellchecker/index.js index 79a2172b4..a07f9f63a 100644 --- a/src/features/spellchecker/index.js +++ b/src/features/spellchecker/index.js | |||
@@ -5,18 +5,18 @@ import { DEFAULT_FEATURES_CONFIG } from '../../config'; | |||
5 | const debug = require('debug')('Franz:feature:spellchecker'); | 5 | const debug = require('debug')('Franz:feature:spellchecker'); |
6 | 6 | ||
7 | export const config = observable({ | 7 | export const config = observable({ |
8 | isPremium: DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature, | 8 | isIncludedInCurrentPlan: DEFAULT_FEATURES_CONFIG.isSpellcheckerIncludedInCurrentPlan, |
9 | }); | 9 | }); |
10 | 10 | ||
11 | export default function init(stores) { | 11 | export default function init(stores) { |
12 | debug('Initializing `spellchecker` feature'); | 12 | debug('Initializing `spellchecker` feature'); |
13 | 13 | ||
14 | autorun(() => { | 14 | autorun(() => { |
15 | const { isSpellcheckerPremiumFeature } = stores.features.features; | 15 | const { isSpellcheckerIncludedInCurrentPlan } = stores.features.features; |
16 | 16 | ||
17 | config.isPremium = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature; | 17 | config.isIncludedInCurrentPlan = isSpellcheckerIncludedInCurrentPlan !== undefined ? isSpellcheckerIncludedInCurrentPlan : DEFAULT_FEATURES_CONFIG.isSpellcheckerIncludedInCurrentPlan; |
18 | 18 | ||
19 | if (!stores.user.data.isPremium && config.isPremium && stores.settings.app.enableSpellchecking) { | 19 | if (!stores.user.data.isPremium && config.isIncludedInCurrentPlan && stores.settings.app.enableSpellchecking) { |
20 | debug('Override settings.spellcheckerEnabled flag to false'); | 20 | debug('Override settings.spellcheckerEnabled flag to false'); |
21 | 21 | ||
22 | Object.assign(stores.settings.app, { | 22 | Object.assign(stores.settings.app, { |
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 07b16ff23..e1adc9cab 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -251,9 +251,9 @@ export default class WorkspacesStore extends FeatureStore { | |||
251 | _setIsPremiumFeatureReaction = () => { | 251 | _setIsPremiumFeatureReaction = () => { |
252 | const { features, user } = this.stores; | 252 | const { features, user } = this.stores; |
253 | const { isPremium } = user.data; | 253 | const { isPremium } = user.data; |
254 | const { isWorkspacePremiumFeature } = features.features; | 254 | const { isWorkspaceIncludedInCurrentPlan } = features.features; |
255 | this.isPremiumFeature = isWorkspacePremiumFeature; | 255 | this.isPremiumFeature = isWorkspaceIncludedInCurrentPlan; |
256 | this.isPremiumUpgradeRequired = isWorkspacePremiumFeature && !isPremium; | 256 | this.isPremiumUpgradeRequired = isWorkspaceIncludedInCurrentPlan && !isPremium; |
257 | }; | 257 | }; |
258 | 258 | ||
259 | _setWorkspaceBeingEditedReaction = () => { | 259 | _setWorkspaceBeingEditedReaction = () => { |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 4cffea110..513295b5e 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -701,10 +701,10 @@ export default class ServicesStore extends Store { | |||
701 | } | 701 | } |
702 | 702 | ||
703 | if (service.isUsingCustomUrl) { | 703 | if (service.isUsingCustomUrl) { |
704 | service.isServiceAccessRestricted = features.isCustomUrlPremiumFeature; | 704 | service.isServiceAccessRestricted = features.isCustomUrlIncludedInCurrentPlan; |
705 | service.restrictionType = RESTRICTION_TYPES.CUSTOM_URL; | 705 | service.restrictionType = RESTRICTION_TYPES.CUSTOM_URL; |
706 | 706 | ||
707 | if (features.isCustomUrlPremiumFeature) { | 707 | if (features.isCustomUrlIncludedInCurrentPlan) { |
708 | debug('Restricting access to server due to custom url'); | 708 | debug('Restricting access to server due to custom url'); |
709 | } | 709 | } |
710 | } | 710 | } |