use ENABLE_MATURE
This commit is contained in:
parent
6b2569e5f2
commit
9af3380af7
3 changed files with 5 additions and 4 deletions
|
@ -71,7 +71,8 @@ STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
|
||||||
|
|
||||||
|
|
||||||
# SIMPLE_SITE REPLACEMENTS
|
# SIMPLE_SITE REPLACEMENTS
|
||||||
#ENABLE_MATURE=true
|
ENABLE_MATURE=true
|
||||||
|
ENABLE_UI_NOTIFICATIONS=false
|
||||||
|
|
||||||
#VIDEO_ENABLED=true
|
#VIDEO_ENABLED=true
|
||||||
#AUDIO_ENABLED=true
|
#AUDIO_ENABLED=true
|
||||||
|
@ -87,6 +88,5 @@ STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
|
||||||
#USE_FOOTER=true
|
#USE_FOOTER=true
|
||||||
#USE_DISCOVER_WHITELIST=false
|
#USE_DISCOVER_WHITELIST=false
|
||||||
#ENABLE_WILD_WEST=false
|
#ENABLE_WILD_WEST=false
|
||||||
ENABLE_UI_NOTIFICATIONS=false
|
|
||||||
#FULL_SIDE_LINKS=true
|
#FULL_SIDE_LINKS=true
|
||||||
#
|
#
|
||||||
|
|
|
@ -51,6 +51,7 @@ const config = {
|
||||||
KNOWN_APP_DOMAINS: process.env.KNOWN_APP_DOMAINS ? process.env.KNOWN_APP_DOMAINS.split(',') : [],
|
KNOWN_APP_DOMAINS: process.env.KNOWN_APP_DOMAINS ? process.env.KNOWN_APP_DOMAINS.split(',') : [],
|
||||||
STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY,
|
STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY,
|
||||||
ENABLE_UI_NOTIFICATIONS: process.env.ENABLE_UI_NOTIFICATIONS === 'true',
|
ENABLE_UI_NOTIFICATIONS: process.env.ENABLE_UI_NOTIFICATIONS === 'true',
|
||||||
|
ENABLE_MATURE: process.env.ENABLE_MATURE === 'true',
|
||||||
};
|
};
|
||||||
|
|
||||||
config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;
|
config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { SETTINGS, DAEMON_SETTINGS } from 'lbry-redux';
|
import { SETTINGS, DAEMON_SETTINGS } from 'lbry-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import homepages from 'homepages';
|
import homepages from 'homepages';
|
||||||
import { SIMPLE_SITE } from 'config';
|
import { ENABLE_MATURE } from 'config';
|
||||||
import { getDefaultHomepageKey, getDefaultLanguage } from 'util/default-languages';
|
import { getDefaultHomepageKey, getDefaultLanguage } from 'util/default-languages';
|
||||||
|
|
||||||
const selectState = (state) => state.settings || {};
|
const selectState = (state) => state.settings || {};
|
||||||
|
@ -22,7 +22,7 @@ export const makeSelectClientSetting = (setting) =>
|
||||||
createSelector(selectClientSettings, (settings) => (settings ? settings[setting] : undefined));
|
createSelector(selectClientSettings, (settings) => (settings ? settings[setting] : undefined));
|
||||||
|
|
||||||
// refactor me
|
// refactor me
|
||||||
export const selectShowMatureContent = SIMPLE_SITE
|
export const selectShowMatureContent = !ENABLE_MATURE
|
||||||
? createSelector(() => false)
|
? createSelector(() => false)
|
||||||
: makeSelectClientSetting(SETTINGS.SHOW_MATURE);
|
: makeSelectClientSetting(SETTINGS.SHOW_MATURE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue