diff --git a/ui/component/settingSystem/index.js b/ui/component/settingSystem/index.js index 712a8af41..1d7cacc02 100644 --- a/ui/component/settingSystem/index.js +++ b/ui/component/settingSystem/index.js @@ -1,7 +1,14 @@ import { connect } from 'react-redux'; import { doWalletStatus, selectWalletIsEncrypted } from 'lbry-redux'; -import { doClearCache, doNotifyDecryptWallet, doNotifyEncryptWallet, doNotifyForgetPassword } from 'redux/actions/app'; +import { + doClearCache, + doNotifyDecryptWallet, + doNotifyEncryptWallet, + doNotifyForgetPassword, + doToggle3PAnalytics, +} from 'redux/actions/app'; import { doSetDaemonSetting, doClearDaemonSetting, doFindFFmpeg } from 'redux/actions/settings'; +import { selectAllowAnalytics } from 'redux/selectors/app'; import { selectDaemonSettings, selectFfmpegStatus, selectFindingFFmpeg } from 'redux/selectors/settings'; import { selectUserVerifiedEmail } from 'redux/selectors/user'; import SettingSystem from './view'; @@ -12,6 +19,7 @@ const select = (state) => ({ findingFFmpeg: selectFindingFFmpeg(state), walletEncrypted: selectWalletIsEncrypted(state), isAuthenticated: selectUserVerifiedEmail(state), + allowAnalytics: selectAllowAnalytics(state), }); const perform = (dispatch) => ({ @@ -23,6 +31,7 @@ const perform = (dispatch) => ({ decryptWallet: () => dispatch(doNotifyDecryptWallet()), updateWalletStatus: () => dispatch(doWalletStatus()), confirmForgetPassword: (modalProps) => dispatch(doNotifyForgetPassword(modalProps)), + toggle3PAnalytics: (allow) => dispatch(doToggle3PAnalytics(allow)), }); export default connect(select, perform)(SettingSystem); diff --git a/ui/component/settingSystem/view.jsx b/ui/component/settingSystem/view.jsx index c595cc1b3..68682cc04 100644 --- a/ui/component/settingSystem/view.jsx +++ b/ui/component/settingSystem/view.jsx @@ -42,6 +42,7 @@ type Props = { findingFFmpeg: boolean, walletEncrypted: boolean, isAuthenticated: boolean, + allowAnalytics: boolean, // --- perform --- setDaemonSetting: (string, ?SetDaemonSettingArg) => void, clearDaemonSetting: (string) => void, @@ -51,6 +52,7 @@ type Props = { decryptWallet: () => void, updateWalletStatus: () => void, confirmForgetPassword: ({}) => void, + toggle3PAnalytics: (boolean) => void, }; export default function SettingSystem(props: Props) { @@ -60,6 +62,7 @@ export default function SettingSystem(props: Props) { findingFFmpeg, walletEncrypted, isAuthenticated, + allowAnalytics, setDaemonSetting, clearDaemonSetting, clearCache, @@ -68,6 +71,7 @@ export default function SettingSystem(props: Props) { decryptWallet, updateWalletStatus, confirmForgetPassword, + toggle3PAnalytics, } = props; const [clearingCache, setClearingCache] = React.useState(false); @@ -166,6 +170,43 @@ export default function SettingSystem(props: Props) { {/* @endif */} + {/* @if TARGET='app' */} + + {__( + `This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you sign in to lbry.tv)` + )}{' '} +