mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-11-02 03:21:11 +01:00
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
49 lines
1 KiB
JavaScript
49 lines
1 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);
|