mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Add linkify handlers
This commit is contained in:
parent
ce33c8cdf6
commit
99e8a54a27
@ -25,6 +25,8 @@ var MatrixChatController = require('matrix-react-sdk/lib/controllers/pages/Matri
|
|||||||
var Loader = require("react-loader");
|
var Loader = require("react-loader");
|
||||||
|
|
||||||
var dis = require('matrix-react-sdk/lib/dispatcher');
|
var dis = require('matrix-react-sdk/lib/dispatcher');
|
||||||
|
var Matrix = require("matrix-js-sdk");
|
||||||
|
var ContextualMenu = require("../../../../ContextualMenu");
|
||||||
|
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
@ -46,6 +48,22 @@ module.exports = React.createClass({
|
|||||||
window.removeEventListener('resize', this.handleResize);
|
window.removeEventListener('resize', this.handleResize);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onAliasClick: function(event, alias) {
|
||||||
|
event.preventDefault();
|
||||||
|
dis.dispatch({action: 'view_room_alias', room_alias: alias});
|
||||||
|
},
|
||||||
|
|
||||||
|
onUserClick: function(event, userId) {
|
||||||
|
event.preventDefault();
|
||||||
|
var MemberInfo = sdk.getComponent('molecules.MemberInfo');
|
||||||
|
var member = new Matrix.RoomMember(null, userId);
|
||||||
|
ContextualMenu.createMenu(MemberInfo, {
|
||||||
|
member: member,
|
||||||
|
right: window.innerWidth - event.pageX,
|
||||||
|
top: event.pageY
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
handleResize: function(e) {
|
handleResize: function(e) {
|
||||||
var hideLhsThreshold = 1000;
|
var hideLhsThreshold = 1000;
|
||||||
var showLhsThreshold = 1000;
|
var showLhsThreshold = 1000;
|
||||||
|
Loading…
Reference in New Issue
Block a user