Wire up Unknown Devices popup for outbound calls
This commit is contained in:
parent
aeca83ff2e
commit
b0027525f3
4 changed files with 92 additions and 47 deletions
|
@ -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}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue