implement bottom-right call button
This commit is contained in:
parent
d8bc362a89
commit
28c3787fb3
10 changed files with 25 additions and 7 deletions
|
@ -22,6 +22,7 @@ var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
|||
var MessageComposerController = require('matrix-react-sdk/lib/controllers/molecules/MessageComposer')
|
||||
|
||||
var sdk = require('matrix-react-sdk')
|
||||
var dis = require('matrix-react-sdk/lib/dispatcher')
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'MessageComposer',
|
||||
|
@ -40,6 +41,14 @@ module.exports = React.createClass({
|
|||
this.refs.uploadInput.getDOMNode().value = null;
|
||||
},
|
||||
|
||||
onCallClick: function(ev) {
|
||||
dis.dispatch({
|
||||
action: 'place_call',
|
||||
type: ev.shiftKey ? "screensharing" : "video",
|
||||
room_id: this.props.room.roomId
|
||||
});
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var me = this.props.room.getMember(MatrixClientPeg.get().credentials.userId);
|
||||
var uploadInputStyle = {display: 'none'};
|
||||
|
@ -58,6 +67,9 @@ module.exports = React.createClass({
|
|||
<img src="img/upload.png" width="17" height="22"/>
|
||||
<input type="file" style={uploadInputStyle} ref="uploadInput" onChange={this.onUploadFileSelected} />
|
||||
</div>
|
||||
<div className="mx_MessageComposer_call" onClick={this.onCallClick}>
|
||||
<img src="img/call.png" width="28" height="20"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue