migrates settings to redux

This commit is contained in:
jessop 2020-02-16 14:52:58 -05:00
parent 3d64f8acc6
commit 67a5654ffe
2 changed files with 52 additions and 11 deletions

39
dist/bundle.es.js vendored
View file

@ -604,17 +604,31 @@ var pages = /*#__PURE__*/Object.freeze({
/* hardcoded names still exist for these in reducers/settings.js - only discovered when debugging */
/* Many SETTINGS are stored in the localStorage by their name -
be careful about changing the value of a SETTINGS constant, as doing so can invalidate existing SETTINGS */
const SHOW_NSFW = 'showNsfw';
const CREDIT_REQUIRED_ACKNOWLEDGED = 'credit_required_acknowledged';
const NEW_USER_ACKNOWLEDGED = 'welcome_acknowledged';
const EMAIL_COLLECTION_ACKNOWLEDGED = 'email_collection_acknowledged';
const INVITE_ACKNOWLEDGED = 'invite_acknowledged';
const LANGUAGE = 'language';
const SHOW_NSFW = 'showNsfw';
const SHOW_UNAVAILABLE = 'showUnavailable';
const INSTANT_PURCHASE_ENABLED = 'instantPurchaseEnabled';
const INSTANT_PURCHASE_MAX = 'instantPurchaseMax';
const SHOW_MATURE = 'show_mature';
const SHOW_ANONYMOUS = 'show_anonymous';
const SHOW_UNAVAILABLE = 'show_unavailable';
const INSTANT_PURCHASE_ENABLED = 'instant_purchase_enabled';
const INSTANT_PURCHASE_MAX = 'instant_purchase_max';
const THEME = 'theme';
const THEMES = 'themes';
const AUTOMATIC_DARK_MODE_ENABLED = 'automaticDarkModeEnabled';
const AUTOMATIC_DARK_MODE_ENABLED = 'automatic_dark_mode_enabled';
const AUTOPLAY = 'autoplay';
const OS_NOTIFICATIONS_ENABLED = 'os_notifications_enabled';
const AUTO_DOWNLOAD = 'auto_download';
const AUTO_LAUNCH = 'auto_launch';
const SUPPORT_OPTION = 'support_option';
const HIDE_BALANCE = 'hide_balance';
const HIDE_SPLASH_ANIMATION = 'hide_splash_animation';
const FLOATING_PLAYER = 'floating_player';
const DARK_MODE_TIMES = 'dark_mode_times';
const ENABLE_SYNC = 'enable_sync';
// mobile settings
const BACKGROUND_PLAY_ENABLED = 'backgroundPlayEnabled';
@ -627,17 +641,30 @@ const RECEIVE_INTERESTS_NOTIFICATIONS = 'receiveInterestsNotifications';
const RECEIVE_CREATOR_NOTIFICATIONS = 'receiveCreatorNotifications';
var settings = /*#__PURE__*/Object.freeze({
SHOW_NSFW: SHOW_NSFW,
CREDIT_REQUIRED_ACKNOWLEDGED: CREDIT_REQUIRED_ACKNOWLEDGED,
NEW_USER_ACKNOWLEDGED: NEW_USER_ACKNOWLEDGED,
EMAIL_COLLECTION_ACKNOWLEDGED: EMAIL_COLLECTION_ACKNOWLEDGED,
INVITE_ACKNOWLEDGED: INVITE_ACKNOWLEDGED,
LANGUAGE: LANGUAGE,
SHOW_NSFW: SHOW_NSFW,
SHOW_MATURE: SHOW_MATURE,
SHOW_ANONYMOUS: SHOW_ANONYMOUS,
SHOW_UNAVAILABLE: SHOW_UNAVAILABLE,
INSTANT_PURCHASE_ENABLED: INSTANT_PURCHASE_ENABLED,
INSTANT_PURCHASE_MAX: INSTANT_PURCHASE_MAX,
THEME: THEME,
THEMES: THEMES,
AUTOMATIC_DARK_MODE_ENABLED: AUTOMATIC_DARK_MODE_ENABLED,
AUTOPLAY: AUTOPLAY,
OS_NOTIFICATIONS_ENABLED: OS_NOTIFICATIONS_ENABLED,
AUTO_DOWNLOAD: AUTO_DOWNLOAD,
AUTO_LAUNCH: AUTO_LAUNCH,
SUPPORT_OPTION: SUPPORT_OPTION,
HIDE_BALANCE: HIDE_BALANCE,
HIDE_SPLASH_ANIMATION: HIDE_SPLASH_ANIMATION,
FLOATING_PLAYER: FLOATING_PLAYER,
DARK_MODE_TIMES: DARK_MODE_TIMES,
ENABLE_SYNC: ENABLE_SYNC,
BACKGROUND_PLAY_ENABLED: BACKGROUND_PLAY_ENABLED,
FOREGROUND_NOTIFICATION_ENABLED: FOREGROUND_NOTIFICATION_ENABLED,
KEEP_DAEMON_RUNNING: KEEP_DAEMON_RUNNING,

View file

@ -1,17 +1,31 @@
/* hardcoded names still exist for these in reducers/settings.js - only discovered when debugging */
/* Many SETTINGS are stored in the localStorage by their name -
be careful about changing the value of a SETTINGS constant, as doing so can invalidate existing SETTINGS */
export const SHOW_NSFW = 'showNsfw';
export const CREDIT_REQUIRED_ACKNOWLEDGED = 'credit_required_acknowledged';
export const NEW_USER_ACKNOWLEDGED = 'welcome_acknowledged';
export const EMAIL_COLLECTION_ACKNOWLEDGED = 'email_collection_acknowledged';
export const INVITE_ACKNOWLEDGED = 'invite_acknowledged';
export const LANGUAGE = 'language';
export const SHOW_NSFW = 'showNsfw';
export const SHOW_UNAVAILABLE = 'showUnavailable';
export const INSTANT_PURCHASE_ENABLED = 'instantPurchaseEnabled';
export const INSTANT_PURCHASE_MAX = 'instantPurchaseMax';
export const SHOW_MATURE = 'show_mature';
export const SHOW_ANONYMOUS = 'show_anonymous';
export const SHOW_UNAVAILABLE = 'show_unavailable';
export const INSTANT_PURCHASE_ENABLED = 'instant_purchase_enabled';
export const INSTANT_PURCHASE_MAX = 'instant_purchase_max';
export const THEME = 'theme';
export const THEMES = 'themes';
export const AUTOMATIC_DARK_MODE_ENABLED = 'automaticDarkModeEnabled';
export const AUTOMATIC_DARK_MODE_ENABLED = 'automatic_dark_mode_enabled';
export const AUTOPLAY = 'autoplay';
export const OS_NOTIFICATIONS_ENABLED = 'os_notifications_enabled';
export const AUTO_DOWNLOAD = 'auto_download';
export const AUTO_LAUNCH = 'auto_launch';
export const SUPPORT_OPTION = 'support_option';
export const HIDE_BALANCE = 'hide_balance';
export const HIDE_SPLASH_ANIMATION = 'hide_splash_animation';
export const FLOATING_PLAYER = 'floating_player';
export const DARK_MODE_TIMES = 'dark_mode_times';
export const ENABLE_SYNC = 'enable_sync';
// mobile settings
export const BACKGROUND_PLAY_ENABLED = 'backgroundPlayEnabled';