// @flow import * as PAGES from 'constants/pages'; import * as ICONS from 'constants/icons'; import * as React from 'react'; import Button from 'component/button'; import Page from 'component/page'; import SettingAccount from 'component/settingAccount'; import SettingAppearance from 'component/settingAppearance'; import SettingContent from 'component/settingContent'; import SettingSystem from 'component/settingSystem'; import Card from 'component/common/card'; import classnames from 'classnames'; import Yrbl from 'component/yrbl'; type Price = { currency: string, amount: number, }; type DaemonSettings = { download_dir: string, share_usage_data: boolean, }; type Props = { daemonSettings: DaemonSettings, isAuthenticated: boolean, instantPurchaseEnabled: boolean, instantPurchaseMax: Price, openModal: (string) => void, enterSettings: () => void, exitSettings: () => void, }; class SettingsPage extends React.PureComponent { componentDidMount() { const { enterSettings } = this.props; enterSettings(); } componentWillUnmount() { const { exitSettings } = this.props; exitSettings(); } render() { const { daemonSettings, isAuthenticated, // autoDownload, } = this.props; const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0; const newStyle = true; return newStyle ? ( ) : ( {!isAuthenticated && IS_WEB && (
} /> )} {!IS_WEB && noDaemonSettings ? (
{__('Failed to load settings.')}
) : (
{(isAuthenticated || !IS_WEB) && ( <>
} /> )} )}
); } } export default SettingsPage;