24 lines
1,008 B
JavaScript
24 lines
1,008 B
JavaScript
|
import { connect } from 'react-redux';
|
||
|
import { doSetDaemonSetting } from 'redux/actions/settings';
|
||
|
import { doSetWelcomeVersion } from 'redux/actions/app';
|
||
|
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
|
||
|
import { WELCOME_VERSION } from 'config.js';
|
||
|
import { selectDaemonSettings, selectDaemonStatus } from 'redux/selectors/settings';
|
||
|
|
||
|
import WelcomeSplash from './view';
|
||
|
import { selectDiskSpace } from 'redux/selectors/app';
|
||
|
|
||
|
const select = (state) => ({
|
||
|
diskSpace: selectDiskSpace(state),
|
||
|
daemonSettings: selectDaemonSettings(state),
|
||
|
daemonStatus: selectDaemonStatus(state),
|
||
|
});
|
||
|
|
||
|
const perform = (dispatch) => ({
|
||
|
setWelcomeVersion: (version) => dispatch(doSetWelcomeVersion(version || WELCOME_VERSION)),
|
||
|
setShareDataInternal: (share) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
|
||
|
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.BLOB_STORAGE_LIMIT_MB, value)),
|
||
|
});
|
||
|
|
||
|
export default connect(select, perform)(WelcomeSplash);
|