mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
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();
|
||||
};
|
||||
|
||||
onDontMatchClick = () => {
|
||||
this.setState({ cancelling: true });
|
||||
this.props.onCancel();
|
||||
};
|
||||
|
||||
render() {
|
||||
let sasDisplay;
|
||||
let sasCaption;
|
||||
|
@ -98,9 +103,14 @@ export default class VerificationShowSas extends React.Component {
|
|||
}
|
||||
|
||||
let confirm;
|
||||
if (this.state.pending) {
|
||||
const {displayName} = this.props;
|
||||
const text = _t("Waiting for %(displayName)s to verify…", {displayName});
|
||||
if (this.state.pending || this.state.cancelling) {
|
||||
let text;
|
||||
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} />;
|
||||
} else {
|
||||
// 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}
|
||||
primaryButtonClass="mx_UserInfo_wideButton"
|
||||
cancelButton={_t("They don't match")}
|
||||
onCancel={this.props.onCancel}
|
||||
onCancel={this.onDontMatchClick}
|
||||
cancelButtonClass="mx_UserInfo_wideButton"
|
||||
/>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue