You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-16 06:42:26 +03:00
Wire up Unknown Devices popup for outbound calls
This commit is contained in:
@@ -98,13 +98,19 @@ export default React.createClass({
|
||||
// map from userid -> deviceid -> deviceinfo
|
||||
devices: PropTypes.object.isRequired,
|
||||
onFinished: PropTypes.func.isRequired,
|
||||
sendAnywayButton: PropTypes.node,
|
||||
sendAnywayLabel: PropTypes.string.isRequired,
|
||||
onSendAnyway: PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
_onDismissClicked: function() {
|
||||
this.props.onFinished();
|
||||
},
|
||||
|
||||
_onSendAnywayClicked: function() {
|
||||
this.props.onFinished();
|
||||
this.props.onSendAnyway();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
if (this.props.devices === null) {
|
||||
const Spinner = sdk.getComponent("elements.Spinner");
|
||||
@@ -148,6 +154,9 @@ export default React.createClass({
|
||||
</GeminiScrollbar>
|
||||
<div className="mx_Dialog_buttons">
|
||||
{this.props.sendAnywayButton}
|
||||
<button onClick={this._onSendAnywayClicked}>
|
||||
{ this.props.sendAnywayLabel }
|
||||
</button>
|
||||
<button className="mx_Dialog_primary" autoFocus={true}
|
||||
onClick={this._onDismissClicked}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user