UI spinner when clicking "they don't match"
This commit is contained in:
parent
2127edb7b8
commit
b0c87b0eaf
1 changed files with 14 additions and 4 deletions
|
@ -48,6 +48,11 @@ export default class VerificationShowSas extends React.Component {
|
||||||
this.props.onDone();
|
this.props.onDone();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onDontMatchClick = () => {
|
||||||
|
this.setState({ cancelling: true });
|
||||||
|
this.props.onCancel();
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let sasDisplay;
|
let sasDisplay;
|
||||||
let sasCaption;
|
let sasCaption;
|
||||||
|
@ -98,9 +103,14 @@ export default class VerificationShowSas extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
let confirm;
|
let confirm;
|
||||||
if (this.state.pending) {
|
if (this.state.pending || this.state.cancelling) {
|
||||||
const {displayName} = this.props;
|
let text;
|
||||||
const text = _t("Waiting for %(displayName)s to verify…", {displayName});
|
if (this.state.pending) {
|
||||||
|
const {displayName} = this.props;
|
||||||
|
text = _t("Waiting for %(displayName)s to verify…", {displayName});
|
||||||
|
} else {
|
||||||
|
text = _t("Waiting for network…");
|
||||||
|
}
|
||||||
confirm = <PendingActionSpinner text={text} />;
|
confirm = <PendingActionSpinner text={text} />;
|
||||||
} else {
|
} else {
|
||||||
// FIXME: stop using DialogButtons here once this component is only used in the right panel verification
|
// FIXME: stop using DialogButtons here once this component is only used in the right panel verification
|
||||||
|
@ -109,7 +119,7 @@ export default class VerificationShowSas extends React.Component {
|
||||||
onPrimaryButtonClick={this.onMatchClick}
|
onPrimaryButtonClick={this.onMatchClick}
|
||||||
primaryButtonClass="mx_UserInfo_wideButton"
|
primaryButtonClass="mx_UserInfo_wideButton"
|
||||||
cancelButton={_t("They don't match")}
|
cancelButton={_t("They don't match")}
|
||||||
onCancel={this.props.onCancel}
|
onCancel={this.onDontMatchClick}
|
||||||
cancelButtonClass="mx_UserInfo_wideButton"
|
cancelButtonClass="mx_UserInfo_wideButton"
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue