mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
New: UI Updates (Backup Restore in App, Profile Cloning)
UI Pulls from Sonarr
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { restoreBackup, restart } from 'Store/Actions/systemActions';
|
||||
import RestoreBackupModalContent from './RestoreBackupModalContent';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.system.backups,
|
||||
(state) => state.app.isRestarting,
|
||||
(backups, isRestarting) => {
|
||||
const {
|
||||
isRestoring,
|
||||
restoreError
|
||||
} = backups;
|
||||
|
||||
return {
|
||||
isRestoring,
|
||||
restoreError,
|
||||
isRestarting
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function createMapDispatchToProps(dispatch, props) {
|
||||
return {
|
||||
onRestorePress(payload) {
|
||||
dispatch(restoreBackup(payload));
|
||||
},
|
||||
|
||||
dispatchRestart() {
|
||||
dispatch(restart());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(createMapStateToProps, createMapDispatchToProps)(RestoreBackupModalContent);
|
||||
Reference in New Issue
Block a user