enables relevant settings blocks

This commit is contained in:
jessop 2019-08-22 17:14:51 -04:00 committed by Sean Yesmunt
parent 82d57eb574
commit a6d79160eb
2 changed files with 161 additions and 159 deletions

View file

@ -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",

View file

@ -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,13 +208,13 @@ class SettingsPage extends React.PureComponent<Props, State> {
return (
<Page>
{IS_WEB && <UnsupportedOnWeb />}
{noDaemonSettings ? (
{noDaemonSettings && !IS_WEB ? (
<section className="card card--section">
<div className="card__title">{__('Failed to load settings.')}</div>
</section>
) : (
<div className={classnames({ 'card--disabled': IS_WEB })}>
<div>
{!IS_WEB && (
<section className="card card--section">
<h2 className="card__title">{__('Download Directory')}</h2>
@ -231,10 +229,11 @@ class SettingsPage extends React.PureComponent<Props, State> {
<p className="help">{__('LBRY downloads will be saved here.')}</p>
</div>
</section>
)}
{!IS_WEB && (
<section className="card card--section">
<h2 className="card__title">{__('Network and Data Settings')}</h2>
<Form>
<FormField
type="checkbox"
@ -263,6 +262,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
/>
</Form>
</section>
)}
<section className="card card--section">
<header className="card__header">
@ -389,7 +389,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
<Button button="link" label={__('Manage')} navigate={`/$/${PAGES.BLOCKED}`} />
</p>
</section>
{!IS_WEB && (
<section className="card card--section">
<h2 className="card__title">{__('Notifications')}</h2>
<Form>
@ -403,6 +403,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
/>
</Form>
</section>
)}
<section className="card card--section">
<h2 className="card__title">{__('Share Diagnostic Data')}</h2>
@ -485,7 +486,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
</fieldset-section>
</Form>
</section>
{!IS_WEB && (
<section className="card card--section">
<h2 className="card__title">{__('Wallet Security')}</h2>
@ -514,7 +515,8 @@ class SettingsPage extends React.PureComponent<Props, State> {
/>
</Form>
</section>
)}
{!IS_WEB && (
<section className="card card--section">
<h2 className="card__title">{__('Experimental Settings')}</h2>
@ -587,7 +589,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
</fieldset-section>
</Form>
</section>
)}
<section className="card card--section">
<h2 className="card__title">{__('Application Cache')}</h2>