2021-08-05 10:41:45 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { doWalletStatus } from 'redux/actions/wallet';
|
|
|
|
import { selectWalletIsEncrypted } from 'redux/selectors/wallet';
|
2021-08-08 05:13:04 +02:00
|
|
|
import {
|
|
|
|
doClearCache,
|
|
|
|
doNotifyDecryptWallet,
|
|
|
|
doNotifyEncryptWallet,
|
|
|
|
doNotifyForgetPassword,
|
|
|
|
doToggle3PAnalytics,
|
|
|
|
} from 'redux/actions/app';
|
2021-08-07 15:35:11 +02:00
|
|
|
import { doSetDaemonSetting, doClearDaemonSetting, doFindFFmpeg } from 'redux/actions/settings';
|
2021-08-08 05:13:04 +02:00
|
|
|
import { selectAllowAnalytics } from 'redux/selectors/app';
|
2022-03-04 16:29:20 +01:00
|
|
|
import { selectDaemonSettings, selectFfmpegStatus, selectFindingFFmpeg } from 'redux/selectors/settings';
|
2022-06-27 20:44:17 +02:00
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user'; // here
|
2021-08-09 07:50:11 +02:00
|
|
|
|
2021-08-05 10:41:45 +02:00
|
|
|
import SettingSystem from './view';
|
|
|
|
|
2021-08-06 10:25:37 +02:00
|
|
|
const select = (state) => ({
|
|
|
|
daemonSettings: selectDaemonSettings(state),
|
2021-08-07 15:35:11 +02:00
|
|
|
ffmpegStatus: selectFfmpegStatus(state),
|
|
|
|
findingFFmpeg: selectFindingFFmpeg(state),
|
2021-08-08 04:26:40 +02:00
|
|
|
walletEncrypted: selectWalletIsEncrypted(state),
|
|
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
2021-08-08 05:13:04 +02:00
|
|
|
allowAnalytics: selectAllowAnalytics(state),
|
2021-08-06 10:25:37 +02:00
|
|
|
});
|
2021-08-05 10:41:45 +02:00
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
2021-08-06 10:25:37 +02:00
|
|
|
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
|
2021-08-07 15:35:11 +02:00
|
|
|
clearDaemonSetting: (key) => dispatch(doClearDaemonSetting(key)),
|
2021-08-05 10:41:45 +02:00
|
|
|
clearCache: () => dispatch(doClearCache()),
|
2021-08-07 15:35:11 +02:00
|
|
|
findFFmpeg: () => dispatch(doFindFFmpeg()),
|
2021-08-08 04:26:40 +02:00
|
|
|
encryptWallet: () => dispatch(doNotifyEncryptWallet()),
|
|
|
|
decryptWallet: () => dispatch(doNotifyDecryptWallet()),
|
|
|
|
updateWalletStatus: () => dispatch(doWalletStatus()),
|
|
|
|
confirmForgetPassword: (modalProps) => dispatch(doNotifyForgetPassword(modalProps)),
|
2021-08-08 05:13:04 +02:00
|
|
|
toggle3PAnalytics: (allow) => dispatch(doToggle3PAnalytics(allow)),
|
2021-08-05 10:41:45 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(SettingSystem);
|