6ff084dbbb
* added notification cleaning drawer * bugfix * fully implemented set operations for notif cleaning * i18n for notif cleaning drawer & improved logic slightly. Also added a confirm dialog * - notif dismiss "overlay" now shoves the notif aside to avoid overlap - added focus ring to header buttons - removed notif overlay entirely from DOM if mode is disabled * removed comment * CSS tuning - inconsistent division lines fix
50 lines
1.0 KiB
JavaScript
50 lines
1.0 KiB
JavaScript
/*
|
|
|
|
`<NotificationOverlayContainer>`
|
|
=========================
|
|
|
|
This container connects `<NotificationOverlay>`s to the Redux store.
|
|
|
|
*/
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
/*
|
|
|
|
Imports:
|
|
--------
|
|
|
|
*/
|
|
|
|
// Package imports //
|
|
import { connect } from 'react-redux';
|
|
|
|
// Our imports //
|
|
import NotificationOverlay from './notification_overlay';
|
|
import { markNotificationForDelete } from '../../../../mastodon/actions/notifications';
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
/*
|
|
|
|
Dispatch mapping:
|
|
-----------------
|
|
|
|
The `mapDispatchToProps()` function maps dispatches to our store to the
|
|
various props of our component. We only need to provide a dispatch for
|
|
deleting notifications.
|
|
|
|
*/
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
onMarkForDelete(id, yes) {
|
|
dispatch(markNotificationForDelete(id, yes));
|
|
},
|
|
});
|
|
|
|
const mapStateToProps = state => ({
|
|
show: state.getIn(['notifications', 'cleaningMode']),
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(NotificationOverlay);
|