From a6d79160eb3cc6559512c038c4565443e5e5b097 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 22 Aug 2019 17:14:51 -0400 Subject: [PATCH] enables relevant settings blocks --- package.json | 2 +- src/ui/page/settings/view.jsx | 318 +++++++++++++++++----------------- 2 files changed, 161 insertions(+), 159 deletions(-) diff --git a/package.json b/package.json index e0b3b89f4..c35338fc1 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "husky": "^0.14.3", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#1af092ce2cb507d9a41711b864874c0bd76935ae", + "lbry-redux": "lbryio/lbry-redux#f4413a8ab4928a9487274568bb72e440c45875be", "lbryinc": "lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/src/ui/page/settings/view.jsx b/src/ui/page/settings/view.jsx index 9378824ab..39f716678 100644 --- a/src/ui/page/settings/view.jsx +++ b/src/ui/page/settings/view.jsx @@ -2,12 +2,10 @@ import * as SETTINGS from 'constants/settings'; import * as PAGES from 'constants/pages'; import * as React from 'react'; -import classnames from 'classnames'; import { FormField, FormFieldPrice, Form } from 'component/common/form'; import Button from 'component/button'; import Page from 'component/page'; import FileSelector from 'component/common/file-selector'; -import UnsupportedOnWeb from 'component/common/unsupported-on-web'; type Price = { currency: string, @@ -210,59 +208,61 @@ class SettingsPage extends React.PureComponent { return ( - {IS_WEB && } - {noDaemonSettings ? ( + {noDaemonSettings && !IS_WEB ? (
{__('Failed to load settings.')}
) : ( -
-
-

{__('Download Directory')}

+
+ {!IS_WEB && ( +
+

{__('Download Directory')}

-
- { - setDaemonSetting('download_dir', newDirectory); - }} - /> -

{__('LBRY downloads will be saved here.')}

-
-
+
+ { + setDaemonSetting('download_dir', newDirectory); + }} + /> +

{__('LBRY downloads will be saved here.')}

+
+
+ )} -
-

{__('Network and Data Settings')}

- -
- setDaemonSetting('save_files', !daemonSettings.save_files)} - checked={daemonSettings.save_files} - label={__('Save all viewed content to your downloads directory')} - helper={__( - 'Paid content and some file types are saved by default. Changing this setting will not affect previously downloaded content.' - )} - /> - -
- setDaemonSetting('save_blobs', !daemonSettings.save_blobs)} - checked={daemonSettings.save_blobs} - label={__('Save hosting data to help the LBRY network')} - helper={ - - {__("If disabled, LBRY will be very sad and you won't be helping improve the network.")}{' '} -
+ {!IS_WEB && ( +
+

{__('Network and Data Settings')}

+
+ setDaemonSetting('save_files', !daemonSettings.save_files)} + checked={daemonSettings.save_files} + label={__('Save all viewed content to your downloads directory')} + helper={__( + 'Paid content and some file types are saved by default. Changing this setting will not affect previously downloaded content.' + )} + /> + +
+ setDaemonSetting('save_blobs', !daemonSettings.save_blobs)} + checked={daemonSettings.save_blobs} + label={__('Save hosting data to help the LBRY network')} + helper={ + + {__("If disabled, LBRY will be very sad and you won't be helping improve the network.")}{' '} +
+ )}
@@ -389,20 +389,21 @@ class SettingsPage extends React.PureComponent {
- -
-

{__('Notifications')}

-
- setClientSetting(SETTINGS.OS_NOTIFICATIONS_ENABLED, !osNotificationsEnabled)} - checked={osNotificationsEnabled} - label={__('Show Desktop Notifications')} - helper={__('Get notified when a publish is confirmed, or when new content is available to watch.')} - /> - -
+ {!IS_WEB && ( +
+

{__('Notifications')}

+
+ setClientSetting(SETTINGS.OS_NOTIFICATIONS_ENABLED, !osNotificationsEnabled)} + checked={osNotificationsEnabled} + label={__('Show Desktop Notifications')} + helper={__('Get notified when a publish is confirmed, or when new content is available to watch.')} + /> + +
+ )}

{__('Share Diagnostic Data')}

@@ -485,109 +486,110 @@ class SettingsPage extends React.PureComponent {
+ {!IS_WEB && ( +
+

{__('Wallet Security')}

-
-

{__('Wallet Security')}

- -
- this.onChangeEncryptWallet()} - checked={walletEncrypted} - label={__('Encrypt my wallet with a custom password')} - helper={ - - {__('Secure your local wallet data with a custom password.')}{' '} - {__('Lost passwords cannot be recovered.')} -
- -
-

{__('Experimental Settings')}

- -
- setClientSetting(SETTINGS.SUPPORT_OPTION, !supportOption)} - checked={supportOption} - label={__('Enable claim support')} - helper={ - - {__('This will add a Support button along side tipping. Similar to tips, supports help ')} -
+ )} + {!IS_WEB && ( +
+

{__('Experimental Settings')}

+ +
+ setClientSetting(SETTINGS.SUPPORT_OPTION, !supportOption)} + checked={supportOption} + label={__('Enable claim support')} + helper={ + + {__('This will add a Support button along side tipping. Similar to tips, supports help ')} +
- + +
+ + + {connectionOptions.map(connectionOption => ( + + ))} + + +
+
+ )}

{__('Application Cache')}