You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
UI spinner when clicking "they don't match"
This commit is contained in:
@@ -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 || this.state.cancelling) {
|
||||||
|
let text;
|
||||||
if (this.state.pending) {
|
if (this.state.pending) {
|
||||||
const {displayName} = this.props;
|
const {displayName} = this.props;
|
||||||
const text = _t("Waiting for %(displayName)s to verify…", {displayName});
|
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"
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user