Only allow none guests to access the context menu
This commit is contained in:
parent
4b26ac58af
commit
6d141d1a7b
1 changed files with 22 additions and 16 deletions
|
@ -67,7 +67,10 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
badgeOnMouseEnter: function() {
|
badgeOnMouseEnter: function() {
|
||||||
|
// Only allow none guests to access the context menu
|
||||||
|
if (!MatrixClientPeg.get().isGuest()) {
|
||||||
this.setState( { badgeHover : true } );
|
this.setState( { badgeHover : true } );
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
badgeOnMouseLeave: function() {
|
badgeOnMouseLeave: function() {
|
||||||
|
@ -75,6 +78,8 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onBadgeClicked: function(e) {
|
onBadgeClicked: function(e) {
|
||||||
|
// Only allow none guests to access the context menu
|
||||||
|
if (!MatrixClientPeg.get().isGuest()) {
|
||||||
var Menu = sdk.getComponent('context_menus.NotificationStateContextMenu');
|
var Menu = sdk.getComponent('context_menus.NotificationStateContextMenu');
|
||||||
var elementRect = e.target.getBoundingClientRect();
|
var elementRect = e.target.getBoundingClientRect();
|
||||||
// The window X and Y offsets are to adjust position when zoomed in to page
|
// The window X and Y offsets are to adjust position when zoomed in to page
|
||||||
|
@ -90,6 +95,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.setState({ menu: true });
|
this.setState({ menu: true });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue