Make notification position configurable.

auto_join_3.3
Håvar Aambø Fosstveit 2020-05-15 21:12:30 +02:00
parent 05d7cb571c
commit ba6c57b283
2 changed files with 17 additions and 13 deletions

View File

@ -70,6 +70,8 @@ var config =
// If false, will push videos away to make room for side
// drawer. If true, will overlay side drawer over videos
drawerOverlayed : true,
// Position of notifications
notificationPosition : 'right',
// Timeout for autohiding topbar and button control bar
hideTimeout : 3000,
lastN : 4,

View File

@ -4,6 +4,8 @@ import PropTypes from 'prop-types';
import { withSnackbar } from 'notistack';
import * as notificationActions from '../../actions/notificationActions';
const notificationPosition = window.config.notificationPosition || 'right';
class Notifications extends Component
{
displayed = [];
@ -45,7 +47,7 @@ class Notifications extends Component
autoHideDuration : notification.timeout,
anchorOrigin : {
vertical : 'bottom',
horizontal : 'left'
horizontal : notificationPosition
}
}
);