Add notification policies and notification requests in web UI (#29433)
This commit is contained in:
parent
19efa1b9f1
commit
c10bbf5fe3
35 changed files with 1278 additions and 252 deletions
|
@ -4,7 +4,7 @@ import { connect } from 'react-redux';
|
|||
|
||||
import { showAlert } from '../../../actions/alerts';
|
||||
import { openModal } from '../../../actions/modal';
|
||||
import { setFilter, clearNotifications, requestBrowserPermission } from '../../../actions/notifications';
|
||||
import { setFilter, clearNotifications, requestBrowserPermission, updateNotificationsPolicy } from '../../../actions/notifications';
|
||||
import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications';
|
||||
import { changeSetting } from '../../../actions/settings';
|
||||
import ColumnSettings from '../components/column_settings';
|
||||
|
@ -21,6 +21,7 @@ const mapStateToProps = state => ({
|
|||
alertsEnabled: state.getIn(['settings', 'notifications', 'alerts']).includes(true),
|
||||
browserSupport: state.getIn(['notifications', 'browserSupport']),
|
||||
browserPermission: state.getIn(['notifications', 'browserPermission']),
|
||||
notificationPolicy: state.get('notificationPolicy'),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch, { intl }) => ({
|
||||
|
@ -73,6 +74,12 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||
dispatch(requestBrowserPermission());
|
||||
},
|
||||
|
||||
onChangePolicy (param, checked) {
|
||||
dispatch(updateNotificationsPolicy({
|
||||
[param]: checked,
|
||||
}));
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(ColumnSettings));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue