Make notification position configurable.
This commit is contained in:
@@ -70,6 +70,8 @@ var config =
|
|||||||
// If false, will push videos away to make room for side
|
// If false, will push videos away to make room for side
|
||||||
// drawer. If true, will overlay side drawer over videos
|
// drawer. If true, will overlay side drawer over videos
|
||||||
drawerOverlayed : true,
|
drawerOverlayed : true,
|
||||||
|
// Position of notifications
|
||||||
|
notificationPosition : 'right',
|
||||||
// Timeout for autohiding topbar and button control bar
|
// Timeout for autohiding topbar and button control bar
|
||||||
hideTimeout : 3000,
|
hideTimeout : 3000,
|
||||||
lastN : 4,
|
lastN : 4,
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import PropTypes from 'prop-types';
|
|||||||
import { withSnackbar } from 'notistack';
|
import { withSnackbar } from 'notistack';
|
||||||
import * as notificationActions from '../../actions/notificationActions';
|
import * as notificationActions from '../../actions/notificationActions';
|
||||||
|
|
||||||
|
const notificationPosition = window.config.notificationPosition || 'right';
|
||||||
|
|
||||||
class Notifications extends Component
|
class Notifications extends Component
|
||||||
{
|
{
|
||||||
displayed = [];
|
displayed = [];
|
||||||
@@ -45,7 +47,7 @@ class Notifications extends Component
|
|||||||
autoHideDuration : notification.timeout,
|
autoHideDuration : notification.timeout,
|
||||||
anchorOrigin : {
|
anchorOrigin : {
|
||||||
vertical : 'bottom',
|
vertical : 'bottom',
|
||||||
horizontal : 'left'
|
horizontal : notificationPosition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user